1
0

Added a route to get all tasks sorted desc by their due dates (#14)

This commit is contained in:
konrad
2018-11-02 16:59:49 +00:00
committed by Gitea
parent 14207a0fa8
commit 31a4a1dd00
6 changed files with 99 additions and 24 deletions

View File

@ -913,3 +913,18 @@ package v1
// "$ref": "#/responses/Message"
// "500":
// "$ref": "#/responses/Message"
// swagger:operation GET /tasks lists getPendingTasks
// ---
// summary: gets all tasks for the currently authenticated user
// consumes:
// - application/json
// produces:
// - application/json
// responses:
// "200":
// "$ref": "#/responses/ListTask"
// "400":
// "$ref": "#/responses/Message"
// "500":
// "$ref": "#/responses/Message"

View File

@ -99,6 +99,13 @@ func RegisterRoutes(e *echo.Echo) {
a.DELETE("/tasks/:listtask", taskHandler.DeleteWeb)
a.POST("/tasks/:listtask", taskHandler.UpdateWeb)
listTaskHandler := &crud.WebHandler{
EmptyStruct: func() crud.CObject {
return &models.ListTasksDummy{}
},
}
a.GET("/tasks", listTaskHandler.ReadAllWeb)
listTeamHandler := &crud.WebHandler{
EmptyStruct: func() crud.CObject {
return &models.TeamList{}