Return JSON and move /budget/:budgetid to API endpoint
This commit is contained in:
@ -52,9 +52,8 @@ func (h *Handler) Serve() {
|
||||
withLogin.GET("/admin/clear-database", h.clearDatabase)
|
||||
|
||||
withBudget := router.Group("")
|
||||
withBudget.Use(h.verifyLoginWithRedirect)
|
||||
withBudget.Use(h.verifyLoginWithForbidden)
|
||||
withBudget.Use(h.getImportantData)
|
||||
withBudget.GET("/budget/:budgetid", h.budgeting)
|
||||
withBudget.GET("/budget/:budgetid/:year/:month", h.budgeting)
|
||||
withBudget.GET("/budget/:budgetid/all-accounts", h.allAccounts)
|
||||
withBudget.GET("/budget/:budgetid/accounts", h.accounts)
|
||||
@ -75,6 +74,10 @@ func (h *Handler) Serve() {
|
||||
authenticated.Use(h.verifyLoginWithForbidden)
|
||||
authenticated.GET("/dashboard", h.dashboard)
|
||||
|
||||
withBudget2 := authenticated.Group("")
|
||||
withBudget2.Use(h.getImportantData)
|
||||
withBudget2.GET("/budget/:budgetid", h.budgeting)
|
||||
|
||||
budget := authenticated.Group("/budget")
|
||||
budget.POST("/new", h.newBudget)
|
||||
|
||||
|
Reference in New Issue
Block a user