Fix rerouted POST
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
This commit is contained in:
parent
854abd9a6b
commit
1c1821b17a
1 changed files with 3 additions and 3 deletions
|
@ -109,9 +109,9 @@ def head_truth(truth_id: str, db: redis.Redis = Depends(get_db_factory())):
|
||||||
return Response()
|
return Response()
|
||||||
|
|
||||||
|
|
||||||
@truth_router.post("/", status_code=201)
|
@truth_router.post("", status_code=201)
|
||||||
def post_truth(payload: TruthPayload, response: JSONResponse, db: redis.Redis = Depends(get_db_factory())):
|
def new_truth(payload: TruthPayload, response: JSONResponse, db: redis.Redis = Depends(get_db_factory())):
|
||||||
"""Stores a new truth"""
|
"""Creates a new truth"""
|
||||||
data = payload.model_dump()
|
data = payload.model_dump()
|
||||||
existing: str = db.get(data["id"])
|
existing: str = db.get(data["id"])
|
||||||
if existing:
|
if existing:
|
||||||
|
|
Loading…
Reference in a new issue