Skip to content

Commit

Permalink
fix missing references, build OK
Browse files Browse the repository at this point in the history
  • Loading branch information
iamatsundere committed May 4, 2021
1 parent 73199ce commit 32c67f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/main
Binary file removed main
Binary file not shown.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func main() {
projectAPI := project.NewProjectAPI(projectStore, logger)
projectAPI.InitRoute(route, "projects")

taskAPI := study.NewTaskAPI(taskStore, studyStore, projectStore, antnStore, idGenerator, logger)
taskAPI := study.NewTaskAPI(taskStore, studyStore, projectStore, objectStore, antnStore, labelStore, idGenerator, logger)
taskAPI.InitRoute(route, "tasks")

objectAPI := object.NewObjectAPI(objectStore, lockerRedis, logger)
Expand Down
5 changes: 4 additions & 1 deletion study/task_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"vindr-lab-api/entities"
"vindr-lab-api/helper"
"vindr-lab-api/mw"
"vindr-lab-api/object"
"vindr-lab-api/project"
"vindr-lab-api/utils"

Expand All @@ -21,8 +22,10 @@ import (
type TaskAPI struct {
taskStore *TaskES
studyStore *StudyES
objectStore *object.ObjectES
projectStore *project.ProjectES
antnStore *annotation.AnnotationES
labelStore *annotation.LabelES
idGenerator *helper.IDGenerator
logger *zap.Logger
}
Expand All @@ -44,7 +47,7 @@ func NewTaskAPI(taskStore *TaskES, studyStore *StudyES, projectStore *project.Pr
func (app *TaskAPI) InitRoute(engine *gin.Engine, path string) {
group := engine.Group(path, mw.WrapAuthInfo(app.logger))
group.GET("", mw.ValidPerms(path, mw.PERM_R), app.GetTasks)
group.POST("/assign", mw.ValidPerms(path, mw.PERM_C), app.CreateTaskV2)
group.POST("/assign", mw.ValidPerms(path, mw.PERM_C), app.CreateTask)
group.POST("/delete_many", mw.ValidPerms(path, mw.PERM_D), app.DeleteTasks)
group.POST("/update_status_many", mw.ValidPerms(path, mw.PERM_U), app.UpdateTasksStatus)
group.GET("/:id", mw.ValidPerms(path, mw.PERM_R), app.GetTask)
Expand Down

0 comments on commit 32c67f2

Please sign in to comment.