Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Konstantinov committed Dec 30, 2022
1 parent c803d42 commit b9f118e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ async def get_power():
async def set_power(power: int):
app.state.available_power = power

return {
'success': True
}
return {'success': True}


@app.get("/get_asic/{asic_id}")
Expand All @@ -68,9 +66,7 @@ async def get_asic(asic_id: int):
host = Hosts.get(id=asic_id)

if not host:
return {
'detail': 'Not Found'
}
return {'detail': 'Not Found'}

return {
'id': host.id,
Expand Down Expand Up @@ -104,6 +100,7 @@ async def update_asic(request: Request):
power_group=data['power_group'],
online='false'
)

return {'success': 'true', 'status': 'created'}
# Updating existing entry
else:
Expand Down

0 comments on commit b9f118e

Please sign in to comment.