💩 Fixed external friends error + added full url to dev env to documentation

master
Alix JEUDI--LEMOINE 5 months ago
parent 9803156d47
commit 83a3462ebb

@ -29,9 +29,11 @@ db = client[MONGODB_DATABASE]
# FastAPI app instance
app = FastAPI(
servers=[
{"url": "https://api.memorymap.fr/api/v1", "description": "Production environment"},
{"url": "http://127.0.0.1:8000/api/v1", "description": "Dev environment"},
{"url": "https://api.memorymap.fr/api/v1", "description": "Production environment"}
],
root_path="/api/v1",
root_path_in_servers=False
)
# OAuth2 scheme

@ -15,7 +15,7 @@ def friends_serialize(friends: list, external_friends: list) -> dict:
})
for external_friend in external_friends:
status = external_friend.status if external_friend.status else 'null'
status = external_friend.status if hasattr(external_friend, 'status') else 'null'
serialized_friends["external_friends"].append({
"id": str(external_friend["_id"]),

@ -12,7 +12,6 @@ def users_serialize(users: list) -> list[UserDTO]:
return serialized_users
def user_serialize(user) -> User:
print(user)
return User(
_id=str(user['_id']),
username=user['username'],

Loading…
Cancel
Save