Skip to content

Commit

Permalink
change 'reset -> update' task bundling naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Oct 14, 2024
1 parent 2e5d946 commit a893f52
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,17 @@ class TaskBundleController @Inject() (
}

/**
* Resets the bundle to the tasks provided, and unlock all tasks removed from current bundle
* Sets the bundle to the tasks provided, and unlock all tasks removed from current bundle
*
* @param bundleId The id of the bundle
* @param taskIds The task ids the bundle will reset to
*/
def resetTaskBundle(
def updateTaskBundle(
id: Long,
taskIds: List[Long]
): Action[AnyContent] = Action.async { implicit request =>
this.sessionManager.authenticatedRequest { implicit user =>
this.serviceManager.taskBundle.resetTaskBundle(user, id, taskIds)
this.serviceManager.taskBundle.updateTaskBundle(user, id, taskIds)
Ok(Json.toJson(this.serviceManager.taskBundle.getTaskBundle(user, id)))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ class TaskBundleRepository @Inject() (
}

/**
* Resets the bundle to the tasks provided, and unlock all tasks removed from current bundle
* Sets the bundle to the tasks provided, and unlock all tasks removed from current bundle
*
* @param bundleId The id of the bundle
* @param taskIds The task ids the bundle will reset to
*/
def resetTaskBundle(
def updateTaskBundle(
user: User,
bundleId: Long,
taskIds: List[Long]
Expand Down
6 changes: 3 additions & 3 deletions app/org/maproulette/framework/service/TaskBundleService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ class TaskBundleService @Inject() (
}

/**
* Resets the bundle to the tasks provided, and unlock all tasks removed from current bundle
* Sets the bundle to the tasks provided, and unlock all tasks removed from current bundle
*
* @param bundleId The id of the bundle
* @param taskIds The task ids the bundle will reset to
*/
def resetTaskBundle(
def updateTaskBundle(
user: User,
bundleId: Long,
taskIds: List[Long]
Expand All @@ -108,7 +108,7 @@ class TaskBundleService @Inject() (
)
}

this.repository.resetTaskBundle(user, bundleId, taskIds)
this.repository.updateTaskBundle(user, bundleId, taskIds)
this.getTaskBundle(user, bundleId)
}

Expand Down
6 changes: 3 additions & 3 deletions conf/v2_route/bundle.api
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ POST /taskBundle @org.maproulette.framework.c
POST /taskBundle/:id @org.maproulette.framework.controller.TaskBundleController.getTaskBundle(id:Long, lockTasks:Boolean ?= false)
###
# tags: [ Bundle ]
# summary: Resets a Task Bundle
# description: Resets the bundle to the tasks provided, and unlock all tasks removed from current bundle
# summary: Updates a Task Bundle
# description: Sets the bundle to the tasks provided, and unlock all tasks removed from current bundle
# responses:
# '200':
# description: Ok with empty body
Expand All @@ -63,7 +63,7 @@ POST /taskBundle/:id @org.maproulette.framework.
# in: query
# description: The task ids the bundle will reset to
###
POST /taskBundle/:id/reset @org.maproulette.framework.controller.TaskBundleController.resetTaskBundle(id: Long, taskIds: List[Long])
POST /taskBundle/:id/update @org.maproulette.framework.controller.TaskBundleController.updateTaskBundle(id: Long, taskIds: List[Long])
###
# tags: [ Bundle ]
# summary: Deletes a Task Bundle
Expand Down

0 comments on commit a893f52

Please sign in to comment.