mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-07-19 01:17:29 +02:00
Add user API endpoints and metrics endpoint
This commit is contained in:
parent
c572bbce85
commit
ff7339d88f
10 changed files with 299 additions and 1 deletions
|
@ -21,6 +21,17 @@ func SetupAPI() chi.Router {
|
|||
router.Post("/auth/login", apiHandleAuthLogin)
|
||||
router.Post("/auth/register", apiHandleAuthRegister)
|
||||
|
||||
router.Route("/users", func(r chi.Router) {
|
||||
r.Use(checkAuthMiddleware)
|
||||
|
||||
r.Get("/", apiHandleAuthUsersList)
|
||||
|
||||
r.Get("/by-name/{name}", apiHandleAuthUserByName)
|
||||
//r.Get("/by-mid/{name}", apiHandleAuthUserByMid)
|
||||
r.Get("/@self", apiHandleAuthUserSelf)
|
||||
r.Get("/{id}", apiHandleAuthUser)
|
||||
})
|
||||
|
||||
router.Route("/entries", func(r chi.Router) {
|
||||
r.Use(checkAuthMiddleware)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue