protect settings write routes

+ prevent updating guest user
+ add docs to whitelisted auth routes
+ fix: sort in get all route
+ fix: folders not having trailing slash in recentlyplayed
This commit is contained in:
mungai-njoroge
2024-05-01 23:44:38 +03:00
parent cfeff7ff51
commit 5d947f3ad9
6 changed files with 37 additions and 23 deletions
+2
View File
@@ -97,6 +97,7 @@ class AddRootDirsBody(BaseModel):
@api.post("/add-root-dirs")
@admin_required()
def add_root_dirs(body: AddRootDirsBody):
"""
Add custom root directories to the database.
@@ -216,6 +217,7 @@ class SetSettingBody(BaseModel):
@api.post("/set")
@admin_required()
def set_setting(body: SetSettingBody):
"""
Set a setting.