added api endpoints
This commit is contained in:
@@ -77,11 +77,11 @@ func (this *Server) Run() {
|
||||
mux.HandleFunc("/api/refresh", handlers.RefreshToken)
|
||||
mux.Handle("/api/logout", auth.AuthMiddleware(this.JWTSecret)(http.HandlerFunc(handlers.Logout)))
|
||||
|
||||
mux.HandleFunc("/api/item", handlers.GetItems)
|
||||
mux.HandleFunc("/api/locations", handlers.CreateLocation)
|
||||
mux.HandleFunc("/api/project", handlers.CreateProject)
|
||||
mux.HandleFunc("/api/stock/add", handlers.AddStock)
|
||||
mux.HandleFunc("/api/project-items/add", handlers.AllocateToProject)
|
||||
mux.Handle("/api/item", auth.AuthMiddleware(this.JWTSecret)(http.HandlerFunc(handlers.Item)))
|
||||
mux.Handle("/api/location", auth.AuthMiddleware(this.JWTSecret)(http.HandlerFunc(handlers.Location)))
|
||||
mux.Handle("/api/project", auth.AuthMiddleware(this.JWTSecret)(http.HandlerFunc(handlers.Project)))
|
||||
mux.Handle("/api/stock", auth.AuthMiddleware(this.JWTSecret)(http.HandlerFunc(handlers.Stock)))
|
||||
mux.Handle("/api/association", auth.AuthMiddleware(this.JWTSecret)(http.HandlerFunc(handlers.Associations)))
|
||||
|
||||
// Assets
|
||||
mux.HandleFunc("/assets/", frontend.Assets)
|
||||
|
||||
Reference in New Issue
Block a user