1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: implement summaries compat endpoint (resolve #44)

fix: fix all time view model
This commit is contained in:
Ferdinand Mütsch
2020-09-11 23:24:51 +02:00
parent a8009e107d
commit 21567e7601
12 changed files with 326 additions and 44 deletions

View File

@@ -96,6 +96,7 @@ func main() {
settingsHandler := routes.NewSettingsHandler(userService)
publicHandler := routes.NewIndexHandler(userService, keyValueService)
compatV1AllHandler := v1Routes.NewCompatV1AllHandler(summaryService)
compatV1SummariesHandler := v1Routes.NewCompatV1SummariesHandler(summaryService)
// Setup Routers
router := mux.NewRouter()
@@ -143,6 +144,7 @@ func main() {
// Compat V1 API Routes
compatV1Router.Path("/users/{user}/all_time_since_today").Methods(http.MethodGet).HandlerFunc(compatV1AllHandler.ApiGet)
compatV1Router.Path("/users/{user}/summaries").Methods(http.MethodGet).HandlerFunc(compatV1SummariesHandler.ApiGet)
// Static Routes
router.PathPrefix("/assets").Handler(http.FileServer(http.Dir("./static")))