Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
51e0439
adding yml for geoserver and extractors
tcnichol Feb 10, 2021
dcd1e3a
adding notes about what fields need to be replaced for extractors
tcnichol Apr 2, 2021
225cb48
Merge branch 'develop' into add-geoserver-yml
tcnichol Apr 2, 2021
59a0bd1
Merge branch 'develop' into add-geoserver-yml
tcnichol Apr 9, 2021
ef0d8ad
using TRAEFIK HOST for proxy
tcnichol Apr 9, 2021
82663f0
all geoserver in one yml
tcnichol May 7, 2021
d9611f9
adding new parameter option string folder id
tcnichol May 21, 2021
88c7d77
updating swagger.yml
tcnichol May 21, 2021
004b96f
using opion[uuid] instead of option[string]
tcnichol May 24, 2021
4cde26a
using opion[uuid] instead of option[string]
tcnichol May 24, 2021
488f6a8
changing option[uuid] to option[string]
tcnichol May 24, 2021
0174387
breaks if x is not a proper UUID
tcnichol May 24, 2021
725473e
fix that handles case of folder_id string is present but not uuid
tcnichol May 24, 2021
8a8df19
getting rid of blank lines
tcnichol May 24, 2021
02a7d5c
Merge branch 'develop' into add-geoserver-yml
tcnichol Jun 2, 2021
4b160bb
Merge branch 'develop' into 232-upload-file-to-folder
lmarini Jul 6, 2021
f65d505
Merge branch 'develop' into 232-upload-file-to-folder
lmarini Jul 7, 2021
b5641d8
Merge branch 'develop' into 232-upload-file-to-folder
lmarini Jul 7, 2021
cb941ea
fixed endpoint, added changelog entry
tcnichol Jul 11, 2021
ee1b820
Merge remote-tracking branch 'origin/232-upload-file-to-folder' into …
tcnichol Jul 11, 2021
5ace6fc
adding indexing for new collections created by the api route
tcnichol Jul 23, 2021
8c343c4
updating CHANGELOG.md
tcnichol Jul 24, 2021
1c6a289
fixing indents
tcnichol Aug 3, 2021
40664db
fixed indents
tcnichol Aug 3, 2021
a306fb1
fixing latest tag
tcnichol Aug 3, 2021
018a16f
fixing name - geotiff preview not previews
tcnichol Aug 3, 2021
e2051a2
adding in env example for geoserver
tcnichol Aug 10, 2021
b481181
Merge branch 'develop' into add-geoserver-yml
max-zilla Aug 16, 2021
023a90c
Merge branch 'develop' into bugfix/257-collection-api-create
tcnichol Aug 16, 2021
ca4d9d8
Merge branch 'develop' into 232-upload-file-to-folder
lmarini Aug 17, 2021
c6b3190
add when parameter to query after/before a date
longshuicy Aug 18, 2021
158dbab
add when in collection and space as well
longshuicy Aug 18, 2021
5641b92
add parameters to yml
longshuicy Aug 31, 2021
8cd8acc
add additional missing paramters to swagger
longshuicy Aug 31, 2021
bbbe0c0
add when in datasetPossibleParents
longshuicy Aug 31, 2021
3454c4d
add changelog
longshuicy Aug 31, 2021
abfabc8
Merge branch 'develop' into add-geoserver-yml
max-zilla Sep 10, 2021
5341e90
Merge branch 'develop' into bugfix/257-collection-api-create
max-zilla Sep 10, 2021
5a43f21
Merge pull request #267 from clowder-framework/266-Add-when-parameter…
max-zilla Sep 10, 2021
fd7d312
Merge branch 'develop' into add-geoserver-yml
max-zilla Sep 10, 2021
9076c09
Merge branch 'develop' into bugfix/257-collection-api-create
max-zilla Sep 10, 2021
e993504
Merge pull request #258 from clowder-framework/bugfix/257-collection-…
max-zilla Sep 10, 2021
612eb29
Merge branch 'develop' into 232-upload-file-to-folder
max-zilla Sep 10, 2021
76e5389
Merge branch 'develop' into add-geoserver-yml
max-zilla Sep 10, 2021
c2e2069
Merge pull request #204 from clowder-framework/add-geoserver-yml
max-zilla Sep 10, 2021
0a75b5d
Merge branch 'develop' into 232-upload-file-to-folder
max-zilla Sep 13, 2021
3b85ce9
Merge pull request #233 from clowder-framework/232-upload-file-to-folder
max-zilla Sep 13, 2021
fa651f1
fix typos (#269)
robkooper Sep 17, 2021
c0d846a
Update extractor docs (#255)
Michael-D-Johnson Sep 17, 2021
2c24549
needing extra 'null'
tcnichol Sep 20, 2021
1814e5b
changelog
tcnichol Sep 20, 2021
fbffafa
Update issue templates
robkooper Sep 27, 2021
6ed056a
Merge branch 'develop' into bugfix/274-cannot-add-dataset-to-space
max-zilla Sep 28, 2021
a41dc4a
Merge pull request #275 from clowder-framework/bugfix/274-cannot-add-…
max-zilla Sep 28, 2021
d25f2a4
adding geojson mime type (#273)
tcnichol Sep 30, 2021
3c5eddc
add id in GET /metadata.jsonld responses (#279)
longshuicy Oct 1, 2021
5279445
missing html closing elements (#284)
robkooper Oct 4, 2021
1ce57e4
199 show space bytes (#263)
tcnichol Oct 4, 2021
8c58fea
Updated release version to 1.19.0.
lmarini Oct 4, 2021
1e12ec6
Added mongodbupdate requirement to
lmarini Oct 5, 2021
3c40c0e
Fixed changelog for v1.19.0.
lmarini Oct 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: bug
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: enhancement
assignees: ''

---
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.19.0 - 2021-10-05
**_Important:_** This update requires a MongoDB update schema due to the new ability of showing summary statistics at the
space level. Make sure to start the application with -DMONGOUPDATE=1.

### Fixed
- Adding dataset to space. Space list on dataset page would be empty - fixed error when no spaces would load. [#274](https://github.com/clowder-framework/clowder/issues/274)
- Typos "success" when returning status from API and "occurred" when logging to console.
- If a dataset had multiple folders the layout would be wrong.
- Collections created using api route are now indexed upon creation. [#257](https://github.com/clowder-framework/clowder/issues/257)

### Added
- Mime type for geojson
- "when" parameter in a few GET API endpoints to enable pagination [#266](https://github.com/clowder-framework/clowder/issues/266)
- Show space statistics (bytes, users. etc) [#119](https://github.com/clowder-framework/clowder/issues/119)
- "id" in GET metadata.jsonld endpoints [#278](https://github.com/clowder-framework/clowder/issues/278)
- 'POST /api/files/uploadToDataset' now allows folder_id for uploading file to folder. [#232](https://github.com/clowder-framework/clowder/issues/232)

## 1.18.1 - 2021-08-16

This release fixes a critical issue where invalid zip files could result in the files not being uploaded correctly. To check to see if you are affected, please use the following query:
Expand Down Expand Up @@ -55,7 +72,6 @@ If any files are returned, you should check to see if these files affected and a

### Changed
- Updated Sphinx dependencies due to security and changes in required packages.

- Updated the three.js libraries for the FBX previewer

## 1.16.0 - 2021-03-31
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Following is a list of contributors in alphabetical order:
- Sandeep Puthanveetil Satheesan
- Smruti Padhy
- Theerasit Issaranon
- Tim Yardley
- Todd Nicholson
- Varun Kethineedi
- Ward Poelmans
Expand Down
103 changes: 70 additions & 33 deletions app/api/Collections.scala
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
package api

import java.io.{ByteArrayInputStream, InputStream, ByteArrayOutputStream}
import java.security.{DigestInputStream, MessageDigest}
import java.text.SimpleDateFormat
import java.util.zip.{ZipEntry, ZipOutputStream, Deflater}

import Iterators.RootCollectionIterator
import _root_.util.JSONLD
import util.SearchUtils
import api.Permission.Permission
import org.apache.commons.codec.binary.Hex
import controllers.Utils
import models._
import play.api.Logger
import play.api.Play.current
import models._
import play.api.libs.concurrent.Execution.Implicits._
import play.api.libs.iteratee.Enumerator
import services._
import play.api.libs.json._
import play.api.libs.json.{JsObject, JsValue}
import play.api.libs.json.Json.toJson
import javax.inject.{ Singleton, Inject}
import scala.collection.mutable.ListBuffer
import scala.concurrent.{Future, ExecutionContext}
import play.api.libs.concurrent.Execution.Implicits._
import scala.util.parsing.json.JSONArray
import scala.util.{Try, Success, Failure}
import java.util.{Calendar, Date}
import controllers.Utils
import play.api.libs.json.{JsObject, JsValue, _}
import services._


import java.io.ByteArrayOutputStream
import java.security.MessageDigest
import java.util.zip.{Deflater, ZipOutputStream}
import java.util.{Calendar, Date}
import javax.inject.{Inject, Singleton}
import scala.collection.immutable.List
import scala.collection.mutable.ListBuffer
import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Success, Try}


/**
Expand Down Expand Up @@ -72,6 +68,13 @@ class Collections @Inject() (datasets: DatasetService,
collections.addToRootSpaces(c.id, s.id)
events.addSourceEvent(request.user, c.id, c.name, s.id, s.name, EventType.ADD_COLLECTION_SPACE.toString)
})
// index collection
current.plugin[ElasticsearchPlugin].foreach{
_.index(SearchUtils.getElasticsearchObject(c))
}
//Add to Events Table
val option_user = userService.findByIdentity(identity)
events.addObjectEvent(option_user, c.id, c.name, EventType.CREATE_COLLECTION.toString)
Ok(toJson(Map("id" -> id)))
}
case None => Ok(toJson(Map("status" -> "error")))
Expand Down Expand Up @@ -237,15 +240,15 @@ class Collections @Inject() (datasets: DatasetService,
}
}

def list(title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listCollections(title, date, limit, Set[Permission](Permission.ViewCollection), false, request.user, request.user.fold(false)(_.superAdminMode), exact)))
def list(when: Option[String], title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listCollections(when, title, date, limit, Set[Permission](Permission.ViewCollection), false, request.user, request.user.fold(false)(_.superAdminMode), exact)))
}

def listCanEdit(title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listCollections(title, date, limit, Set[Permission](Permission.AddResourceToCollection, Permission.EditCollection), false, request.user, request.user.fold(false)(_.superAdminMode), exact)))
def listCanEdit(when: Option[String], title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listCollections(when, title, date, limit, Set[Permission](Permission.AddResourceToCollection, Permission.EditCollection), false, request.user, request.user.fold(false)(_.superAdminMode), exact)))
}

def addDatasetToCollectionOptions(datasetId: UUID, title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
def addDatasetToCollectionOptions(when: Option[String], datasetId: UUID, title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
implicit val user = request.user
var listAll = false
var collectionList: List[Collection] = List.empty
Expand All @@ -265,7 +268,7 @@ class Collections @Inject() (datasets: DatasetService,
}
}
if(listAll) {
collectionList = listCollections(title, date, limit, Set[Permission](Permission.AddResourceToCollection, Permission.EditCollection), false, request.user, request.user.fold(false)(_.superAdminMode), exact)
collectionList = listCollections(when, title, date, limit, Set[Permission](Permission.AddResourceToCollection, Permission.EditCollection), false, request.user, request.user.fold(false)(_.superAdminMode), exact)
}
Ok(toJson(collectionList))
}
Expand All @@ -274,10 +277,10 @@ class Collections @Inject() (datasets: DatasetService,
collections.get(current_collections.map(_.child_collection_ids).flatten).found
}

def listPossibleParents(currentCollectionId : String, title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
def listPossibleParents(when: Option[String], currentCollectionId : String, title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
val selfAndAncestors = collections.getSelfAndAncestors(UUID(currentCollectionId))
val descendants = collections.getAllDescendants(UUID(currentCollectionId)).toList
val allCollections = listCollections(title, date, limit, Set[Permission](Permission.AddResourceToCollection, Permission.EditCollection), false,
val allCollections = listCollections(when, title, date, limit, Set[Permission](Permission.AddResourceToCollection, Permission.EditCollection), false,
request.user, request.user.fold(false)(_.superAdminMode), exact)
val possibleNewParents = allCollections.filter(c =>
if(play.api.Play.current.plugin[services.SpaceSharingPlugin].isDefined) {
Expand All @@ -303,29 +306,55 @@ class Collections @Inject() (datasets: DatasetService,
* Returns list of collections based on parameters and permissions.
* TODO this needs to be cleaned up when do permissions for adding to a resource
*/
private def listCollections(title: Option[String], date: Option[String], limit: Int, permission: Set[Permission], mine: Boolean, user: Option[User], superAdmin: Boolean, exact: Boolean) : List[Collection] = {
private def listCollections(when: Option[String], title: Option[String], date: Option[String], limit: Int, permission: Set[Permission], mine: Boolean, user: Option[User], superAdmin: Boolean, exact: Boolean) : List[Collection] = {
if (mine && user.isEmpty) return List.empty[Collection]

(title, date) match {
case (Some(t), Some(d)) => {
(when, title, date) match {
case (Some(w), Some(t), Some(d)) => {
if (mine)
collections.listUser(d, nextPage=(w=="a"), limit, t, user, superAdmin, user.get, exact)
else
collections.listAccess(d, nextPage=(w=="a"), limit, t, permission, user, superAdmin, true,false, exact)
}
case (Some(w), Some(t), None) => {
if (mine)
collections.listUser(limit, t, user, superAdmin, user.get, exact)
else
collections.listAccess(limit, t, permission, user, superAdmin, true,false, exact)
}
case (Some(w), None, Some(d)) => {
if (mine)
collections.listUser(d, nextPage=(w=="a"), limit, user, superAdmin, user.get)
else
collections.listAccess(d, nextPage=(w=="a"), limit, permission, user, superAdmin, true,false)
}
case (Some(w), None, None) => {
if (mine)
collections.listUser(limit, user, superAdmin, user.get)
else
collections.listAccess(limit, permission, user, superAdmin, true,false)
}

// default when to be "after" if not present in parameters. i.e. nextPage=true
case (None, Some(t), Some(d)) => {
if (mine)
collections.listUser(d, true, limit, t, user, superAdmin, user.get, exact)
else
collections.listAccess(d, true, limit, t, permission, user, superAdmin, true,false, exact)
}
case (Some(t), None) => {
case (None, Some(t), None) => {
if (mine)
collections.listUser(limit, t, user, superAdmin, user.get, exact)
else
collections.listAccess(limit, t, permission, user, superAdmin, true,false, exact)
}
case (None, Some(d)) => {
case (None, None, Some(d)) => {
if (mine)
collections.listUser(d, true, limit, user, superAdmin, user.get)
else
collections.listAccess(d, true, limit, permission, user, superAdmin, true,false)
}
case (None, None) => {
case (None, None, None) => {
if (mine)
collections.listUser(limit, user, superAdmin, user.get)
else
Expand Down Expand Up @@ -572,6 +601,14 @@ class Collections @Inject() (datasets: DatasetService,
events.addSourceEvent(request.user, c.id, c.name, s.id, s.name, EventType.ADD_COLLECTION_SPACE.toString)
}

// index collection
current.plugin[ElasticsearchPlugin].foreach{
_.index(SearchUtils.getElasticsearchObject(c))
}
//Add to Events Table
val option_user = userService.findByIdentity(identity)
events.addObjectEvent(option_user, c.id, c.name, EventType.CREATE_COLLECTION.toString)

//do stuff with parent here
(request.body \"parentId").asOpt[String] match {
case Some(parentId) => {
Expand Down
35 changes: 24 additions & 11 deletions app/api/Datasets.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ class Datasets @Inject()(
}
}

def list(title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listDatasets(title, date, limit, Set[Permission](Permission.ViewDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
def list(when: Option[String], title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listDatasets(when, title, date, limit, Set[Permission](Permission.ViewDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
}

def listCanEdit(title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listDatasets(title, date, limit, Set[Permission](Permission.AddResourceToDataset, Permission.EditDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
def listCanEdit(when: Option[String], title: Option[String], date: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
Ok(toJson(listDatasets(when, title, date, limit, Set[Permission](Permission.AddResourceToDataset, Permission.EditDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
}

def listMoveFileToDataset(file_id: UUID, title: Option[String], limit: Int, exact: Boolean) = PrivateServerAction { implicit request =>
if (play.Play.application().configuration().getBoolean("datasetFileWithinSpace")) {
Ok(toJson(listDatasetsInSpace(file_id, title, limit, Set[Permission](Permission.AddResourceToDataset, Permission.EditDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
} else {
Ok(toJson(listDatasets(title, None, limit, Set[Permission](Permission.AddResourceToDataset, Permission.EditDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
Ok(toJson(listDatasets(None, title, None, limit, Set[Permission](Permission.AddResourceToDataset, Permission.EditDataset), request.user, request.user.fold(false)(_.superAdminMode), exact)))
}
}

Expand Down Expand Up @@ -152,18 +152,31 @@ class Datasets @Inject()(
/**
* Returns list of datasets based on parameters and permissions.
*/
private def listDatasets(title: Option[String], date: Option[String], limit: Int, permission: Set[Permission], user: Option[User], superAdmin: Boolean, exact: Boolean) : List[Dataset] = {
(title, date) match {
case (Some(t), Some(d)) => {
private def listDatasets(when: Option[String], title: Option[String], date: Option[String], limit: Int, permission: Set[Permission], user: Option[User], superAdmin: Boolean, exact: Boolean) : List[Dataset] = {
(when, title, date) match {
case (Some(w), Some(t), Some(d)) => {
datasets.listAccess(d, nextPage=(w=="a"), limit, t, permission, user, superAdmin, true,false, exact)
}
case (Some(w), Some(t), None) => {
datasets.listAccess(limit, t, permission, user, superAdmin, true,false, exact)
}
case (Some(w), None, Some(d)) => {
datasets.listAccess(d, nextPage=(w=="a"), limit, permission, user, superAdmin, true,false)
}
case (Some(w), None, None) => {
datasets.listAccess(limit, permission, user, superAdmin, true,false)
}
// default when to be "after" if not present in parameters. i.e. nextPage=true
case (None, Some(t), Some(d)) => {
datasets.listAccess(d, true, limit, t, permission, user, superAdmin, true,false, exact)
}
case (Some(t), None) => {
case (None, Some(t), None) => {
datasets.listAccess(limit, t, permission, user, superAdmin, true,false, exact)
}
case (None, Some(d)) => {
case (None, None, Some(d)) => {
datasets.listAccess(d, true, limit, permission, user, superAdmin, true,false)
}
case (None, None) => {
case (None, None, None) => {
datasets.listAccess(limit, permission, user, superAdmin, true,false)
}
}
Expand Down
14 changes: 12 additions & 2 deletions app/api/Files.scala
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,16 @@ class Files @Inject()(
/**
* Upload a file to a specific dataset
*/
def uploadToDataset(dataset_id: UUID, showPreviews: String = "DatasetLevel", originalZipFile: String = "", flagsFromPrevious: String = "", extract: Boolean = true) = PermissionAction(Permission.AddResourceToDataset, Some(ResourceRef(ResourceRef.dataset, dataset_id)))(parse.multipartFormData) { implicit request =>
def uploadToDataset(dataset_id: UUID, showPreviews: String = "DatasetLevel", originalZipFile: String = "", flagsFromPrevious: String = "", extract: Boolean = true, folder_id: Option[String]) = PermissionAction(Permission.AddResourceToDataset, Some(ResourceRef(ResourceRef.dataset, dataset_id)))(parse.multipartFormData) { implicit request =>
datasets.get(dataset_id) match {
case Some(dataset) => {
val uploadedFiles = FileUtils.uploadFilesMultipart(request, Some(dataset), showPreviews = showPreviews, originalZipFile = originalZipFile, flagsFromPrevious = flagsFromPrevious, runExtractors = extract, apiKey = request.apiKey)
var current_folder : Option[Folder] = None
if (folder_id != None) {
if (UUID.isValid(folder_id.get)){
current_folder = folders.get(UUID(folder_id.get))
}
}
val uploadedFiles = FileUtils.uploadFilesMultipart(request, Some(dataset), current_folder, showPreviews = showPreviews, originalZipFile = originalZipFile, flagsFromPrevious = flagsFromPrevious, runExtractors = extract, apiKey = request.apiKey)
uploadedFiles.length match {
case 0 => BadRequest("No files uploaded")
case 1 => Ok(Json.obj("id" -> uploadedFiles.head.id))
Expand Down Expand Up @@ -1669,6 +1675,10 @@ class Files @Inject()(
// notify rabbitmq
datasets.findByFileIdAllContain(file.id).foreach { ds =>
routing.fileRemovedFromDataset(file, ds, Utils.baseUrl(request), request.apiKey)
val ds_spaces = ds.spaces
for (ds_s <- ds_spaces) {
spaces.decrementSpaceBytes(ds_s, file.length)
}
}

//this stmt has to be before files.removeFile
Expand Down
6 changes: 3 additions & 3 deletions app/api/Selected.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Selected @Inject()(selections: SelectionService,
selections.get(user.email.get).map(d => {
selections.remove(d.id, user.email.get)
})
Ok(toJson(Map("sucess"->"true")))
Ok(toJson(Map("success"->"true")))
}
}
}
Expand All @@ -100,7 +100,7 @@ class Selected @Inject()(selections: SelectionService,
datasets.removeDataset(d.id, Utils.baseUrl(request), request.apiKey, request.user)
selections.remove(d.id, user.email.get)
})
Ok(toJson(Map("sucess"->"true")))
Ok(toJson(Map("success"->"true")))
}
}
}
Expand Down Expand Up @@ -189,7 +189,7 @@ class Selected @Inject()(selections: SelectionService,
events.addObjectEvent(request.user, d.id, d.name, EventType.ADD_TAGS_DATASET.toString)
datasets.index(d.id)
})
Ok(toJson(Map("sucess"->"true")))
Ok(toJson(Map("success"->"true")))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/api/Sensors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import play.api.Play.current
import services.PostgresPlugin

/**
* Metadata about sensors registered with the system. Datastreams can be associalted with sensors.
* Metadata about sensors registered with the system. Datastreams can be associated with sensors.
*/
object Sensors extends Controller with ApiController {

Expand Down
Loading