Skip to content
Snippets Groups Projects
Commit 64a661db authored by Christian Pointner's avatar Christian Pointner
Browse files

added api endpoint to create groups

parent e06c0b7e
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,10 @@ func InstallHandler(r *mux.Router, st *store.Store, im *importer.Importer, infoL
groupsHandler["GET"] = api.ListGroups()
r.Handle("/groups", groupsHandler)
groupHandler := make(handlers.MethodHandler)
groupHandler["POST"] = api.CreateGroup()
r.Handle("/groups/{group-id}", groupHandler)
// Files
filesHandler := make(handlers.MethodHandler)
filesHandler["GET"] = api.ListFilesOfGroup()
......
......@@ -37,3 +37,9 @@ func (api *API) ListGroups() http.Handler {
sendWebResponse(w, http.StatusOK, GroupsListing{groups})
})
}
func (api *API) CreateGroup() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
sendWebResponse(w, http.StatusNotImplemented, ErrorResponse{"creating groups not yet implemented"})
})
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment