feat(backend): add create user report endpoint

This commit is contained in:
Sam 2023-03-21 17:16:16 +01:00
parent 799d27b58c
commit 3bb97b8274
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
3 changed files with 88 additions and 9 deletions

View file

@ -22,6 +22,9 @@ func Mount(srv *server.Server, r chi.Router) {
r.Patch("/reports/{id}", nil)
})
r.With(server.MustAuth).Post("/users/{id}/reports", server.WrapHandler(s.createUserReport))
r.With(server.MustAuth).Post("/members/{id}/reports", nil)
}
func MustAdmin(next http.Handler) http.Handler {