update: overhauled firmware ui. Added public flash page.
This commit is contained in:
@@ -30,6 +30,7 @@ class MelodyInfo(BaseModel):
|
||||
isTrueRing: bool = False
|
||||
previewURL: str = ""
|
||||
archetype_csv: Optional[str] = None
|
||||
outdated_archetype: bool = False
|
||||
|
||||
|
||||
class MelodyAttributes(BaseModel):
|
||||
|
||||
@@ -146,6 +146,23 @@ async def get_files(
|
||||
return service.get_storage_files(melody_id, melody.uid)
|
||||
|
||||
|
||||
@router.patch("/{melody_id}/set-outdated", response_model=MelodyInDB)
|
||||
async def set_outdated(
|
||||
melody_id: str,
|
||||
outdated: bool = Query(...),
|
||||
_user: TokenPayload = Depends(require_permission("melodies", "edit")),
|
||||
):
|
||||
"""Manually set or clear the outdated_archetype flag on a melody."""
|
||||
melody = await service.get_melody(melody_id)
|
||||
info = melody.information.model_dump()
|
||||
info["outdated_archetype"] = outdated
|
||||
return await service.update_melody(
|
||||
melody_id,
|
||||
MelodyUpdate(information=MelodyInfo(**info)),
|
||||
actor_name=_user.name,
|
||||
)
|
||||
|
||||
|
||||
@router.get("/{melody_id}/download/binary")
|
||||
async def download_binary_file(
|
||||
melody_id: str,
|
||||
|
||||
Reference in New Issue
Block a user