mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-29 14:37:49 +01:00
feat(nativeapi): add user avatar upload and delete endpoints
Adds POST/DELETE /api/user/{id}/image, gated by EnableUserAvatarUpload
(never EnableArtworkUpload) and restricted to the target user or an
admin. Reuses the artist/playlist/radio image-upload handlers via a new
gate opt-out so their EnableArtworkUpload behavior is unchanged.
This commit is contained in:
parent
61bb68fc6b
commit
16c62e075e
4 changed files with 211 additions and 3 deletions
|
|
@ -67,7 +67,7 @@ func (api *Router) routes() http.Handler {
|
|||
r.Use(server.Authenticator(api.ds))
|
||||
r.Use(server.JWTRefresher)
|
||||
r.Use(server.UpdateLastAccessMiddleware(api.ds))
|
||||
api.RX(r, "/user", api.users.NewRepository, true)
|
||||
api.addUserRoute(r)
|
||||
api.R(r, "/song", model.MediaFile{}, false)
|
||||
api.R(r, "/album", model.Album{}, false)
|
||||
api.addArtistRoute(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue