Created basic backend structure, auth and CRUD endpoints.

This commit is contained in:
2025-02-22 13:42:10 +03:00
parent ed5fac3432
commit cabcf837f9
14 changed files with 470 additions and 3 deletions

19
core/exceptions.py Normal file
View File

@@ -0,0 +1,19 @@
from fastapi import HTTPException
class ObjectNotFoundInDB(Exception):
def __init__(self, *args):
super().__init__(*args)
class UserNotFound(HTTPException):
def __init__(
self,
status_code=404,
detail={
"message": "Didn't find a user with the provided id.",
"code": "user-not-found",
},
headers=None,
):
super().__init__(status_code, detail, headers)