From 8e5ff72c4a55cb1aef3c51a0499c206bc76493b5 Mon Sep 17 00:00:00 2001 From: konrad Date: Sun, 2 Dec 2018 19:31:03 +0100 Subject: [PATCH] fixed path to get all tasks (echo bug) --- REST-Tests/lists.http | 6 +++--- pkg/routes/routes.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/REST-Tests/lists.http b/REST-Tests/lists.http index 2513207abf..e1703af1fc 100644 --- a/REST-Tests/lists.http +++ b/REST-Tests/lists.http @@ -107,13 +107,13 @@ Authorization: Bearer {{auth_token}} ### # Get all pending tasks -GET http://localhost:8080/api/v1/tasks +GET http://localhost:8080/api/v1/tasks/all Authorization: Bearer {{auth_token}} ### # Get all pending tasks with priorities -GET http://localhost:8080/api/v1/tasks/desc +GET http://localhost:8080/api/v1/tasks/all/desc Authorization: Bearer {{auth_token}} ### @@ -125,7 +125,7 @@ GET http://localhost:8080/api/v1/tasks/caldav ### # Update a task -POST http://localhost:8080/api/v1/tasks/30 +POST http://localhost:8080/api/v1/tasks/32 Authorization: Bearer {{auth_token}} Content-Type: application/json diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index 8d1d6c45eb..33a3a292f6 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -162,8 +162,8 @@ func RegisterRoutes(e *echo.Echo) { }, } a.PUT("/lists/:list", taskHandler.CreateWeb) - a.GET("/tasks", taskHandler.ReadAllWeb) - a.GET("/tasks/:sort", taskHandler.ReadAllWeb) + a.GET("/tasks/all", taskHandler.ReadAllWeb) + a.GET("/tasks/all/:sort", taskHandler.ReadAllWeb) a.DELETE("/tasks/:listtask", taskHandler.DeleteWeb) a.POST("/tasks/:listtask", taskHandler.UpdateWeb)