Fix: Welten-Config Endpoint-Pfad doppeltes /profile/ entfernt — /api/profile/world-config korrekt (SW by-v659)
This commit is contained in:
parent
eca8d1455d
commit
71a13d695e
4 changed files with 8 additions and 8 deletions
|
|
@ -121,7 +121,7 @@ async def upload_avatar(
|
|||
# ----------------------------------------------------------
|
||||
import json as _json
|
||||
|
||||
@router.get('/profile/world-config')
|
||||
@router.get('/world-config')
|
||||
async def get_world_config(user=Depends(get_current_user)):
|
||||
with db() as conn:
|
||||
row = conn.execute("SELECT world_config FROM users WHERE id=?", (user['id'],)).fetchone()
|
||||
|
|
@ -132,7 +132,7 @@ async def get_world_config(user=Depends(get_current_user)):
|
|||
class WorldConfigIn(BaseModel):
|
||||
config: dict
|
||||
|
||||
@router.put('/profile/world-config')
|
||||
@router.put('/world-config')
|
||||
async def put_world_config(body: WorldConfigIn, user=Depends(get_current_user)):
|
||||
with db() as conn:
|
||||
conn.execute("UPDATE users SET world_config=? WHERE id=?",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue