Mercurial > gemma
comparison pkg/controllers/routes.go @ 1582:dc727824183a
Started with REST API for scheduler.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 13 Dec 2018 18:08:17 +0100 |
parents | 165f31b71042 |
children | caedd9b176f2 |
comparison
equal
deleted
inserted
replaced
1581:8e8523282853 | 1582:dc727824183a |
---|---|
200 api.Handle("/imports/{id:[0-9]+}/{state:(?:accepted|declined)}", | 200 api.Handle("/imports/{id:[0-9]+}/{state:(?:accepted|declined)}", |
201 waterwayAdmin(&JSONHandler{ | 201 waterwayAdmin(&JSONHandler{ |
202 Handle: reviewImport, | 202 Handle: reviewImport, |
203 })).Methods(http.MethodPut) | 203 })).Methods(http.MethodPut) |
204 | 204 |
205 // Import scheduler configuration | |
206 api.Handle("/imports/scheduler}", | |
207 waterwayAdmin(&JSONHandler{ | |
208 Handle: listScheduler, | |
209 })).Methods(http.MethodGet) | |
210 | |
205 // Token handling: Login/Logout. | 211 // Token handling: Login/Logout. |
206 api.HandleFunc("/login", login). | 212 api.HandleFunc("/login", login). |
207 Methods(http.MethodPost) | 213 Methods(http.MethodPost) |
208 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). | 214 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). |
209 Methods(http.MethodGet, http.MethodPost) | 215 Methods(http.MethodGet, http.MethodPost) |