Compare commits
No commits in common. "73569e08396a6ef3bc207571791cb55015409947" and "71b1f1d4a3133e26850a9271fbbcc28129a433b0" have entirely different histories.
73569e0839
...
71b1f1d4a3
@ -1,4 +1,3 @@
|
||||
import bson
|
||||
import fastapi
|
||||
import pydantic
|
||||
|
||||
@ -38,14 +37,14 @@ async def post(body: RequestPostBody):
|
||||
|
||||
@router.put('/api/v1/experiments', status_code=fastapi.status.HTTP_202_ACCEPTED, responses={404: {'description': 'Not found'}})
|
||||
async def put(body: RequestPutBody):
|
||||
changed = await experiments.update(id=bson.ObjectId(body.id), enabled=body.enabled, condition=body.condition)
|
||||
changed = await experiments.update(id=body.id, enabled=body.enabled, condition=body.condition)
|
||||
if not changed:
|
||||
raise fastapi.HTTPException(404)
|
||||
|
||||
|
||||
@router.delete('/api/v1/experiments', status_code=fastapi.status.HTTP_202_ACCEPTED, responses={404: {'description': 'Not found'}})
|
||||
async def delete(body: RequestDeleteBody):
|
||||
changed = await experiments.delete(id=bson.ObjectId(body.id))
|
||||
changed = await experiments.delete(id=body.id)
|
||||
if not changed:
|
||||
raise fastapi.HTTPException(404)
|
||||
|
||||
|
@ -20,7 +20,7 @@ class PlatformStaff(pydantic.BaseModel):
|
||||
|
||||
|
||||
class ResponseBody(pydantic.BaseModel):
|
||||
configs: dict[str, dict|list]
|
||||
configs: dict[str, dict]
|
||||
experiments: dict[str, ExperimentData]
|
||||
platform_staff: PlatformStaff
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user