fix: NVS Generator. cosmetic: Changed CloudFlash page a bit
This commit is contained in:
@@ -123,6 +123,11 @@ class NvsRequest(BaseModel):
|
||||
serial_number: str
|
||||
hw_type: str
|
||||
hw_revision: str
|
||||
nvs_schema: str = "new" # "legacy" | "new"
|
||||
|
||||
@property
|
||||
def legacy(self) -> bool:
|
||||
return self.nvs_schema == "legacy"
|
||||
|
||||
|
||||
@router.post("/cloudflash/nvs.bin")
|
||||
@@ -149,6 +154,7 @@ async def generate_public_nvs(body: NvsRequest):
|
||||
serial_number=sn,
|
||||
hw_family=hw_type,
|
||||
hw_revision=hw_revision,
|
||||
legacy=body.legacy,
|
||||
)
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=500, detail=f"NVS generation failed: {str(e)}")
|
||||
|
||||
Reference in New Issue
Block a user