From 44de66bf50d1ab9a5acc298063cd942768092a19 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 14 Jan 2020 16:37:19 +0100 Subject: [API] add endpoint to check notifications [Extend #9488] (#9595) * introduce GET /notifications/new * add TEST * use Sprintf instead of path.Join * Error more verbose * return number of notifications if unreaded exist * 200 http status for available notifications --- routers/api/v1/api.go | 1 + 1 file changed, 1 insertion(+) (limited to 'routers/api/v1/api.go') diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 86c7450173..4c9f9dd03e 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -518,6 +518,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Combo(""). Get(notify.ListNotifications). Put(notify.ReadNotifications) + m.Get("/new", notify.NewAvailable) m.Combo("/threads/:id"). Get(notify.GetThread). Patch(notify.ReadThread) -- cgit v1.2.3