Fix Firmware update submission endpoint
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
This commit is contained in:
parent
c1dd2e48ea
commit
c5e1a296ee
2 changed files with 2 additions and 3 deletions
|
@ -356,7 +356,7 @@ async def submit_firmware_update(
|
|||
if chargepoint_manager.is_connected(chargepoint_id) == False:
|
||||
raise HTTPException(status_code=503, detail="Chargepoint not connected.")
|
||||
try:
|
||||
firmware_update, status = await firmware_service.submit_firmware_update(firmware_update_id)
|
||||
return FirmwareUpdateSubmissionResponse(firmware_update=firmware_update, status=status)
|
||||
_, status = await firmware_service.submit_firmware_update(firmware_update_id)
|
||||
return FirmwareUpdateSubmissionResponse(status=status)
|
||||
except TimeoutError:
|
||||
raise HTTPException(status_code=503, detail="Chargepoint didn't respond in time.")
|
||||
|
|
|
@ -40,5 +40,4 @@ class FirmwareUpdateCreate(FirmwareUpdateBase):
|
|||
pass
|
||||
|
||||
class FirmwareUpdateSubmissionResponse(BaseModel):
|
||||
firmware_update: FirmwareUpdate
|
||||
status: str
|
||||
|
|
Loading…
Add table
Reference in a new issue