From 874999a93991ee67ce53138fb4864f85117904a7 Mon Sep 17 00:00:00 2001
From: Brieuc Dubois <git@bhasher.com>
Date: Wed, 9 Oct 2024 14:50:42 +0300
Subject: [PATCH] Fix backend not building

---
 backend/Dockerfile       |  2 +-
 backend/app/main.py      | 11 ++++-------
 backend/requirements.txt |  1 -
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/backend/Dockerfile b/backend/Dockerfile
index b55cf35a..db19eaa9 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3
+FROM python:3.12
 
 WORKDIR /app
 
diff --git a/backend/app/main.py b/backend/app/main.py
index 857b253d..677d8b0d 100644
--- a/backend/app/main.py
+++ b/backend/app/main.py
@@ -169,11 +169,10 @@ def read_user(
 @usersRouter.get("", response_model=list[schemas.User])
 def read_users(
     skip: int = 0,
-    limit: int = 100,
     db: Session = Depends(get_db),
     current_user: schemas.User = Depends(get_jwt_user),
 ):
-    return crud.get_users(db, skip=skip, limit=limit)
+    return crud.get_users(db, skip=skip)
 
 
 @usersRouter.delete("/{user_id}", status_code=status.HTTP_204_NO_CONTENT)
@@ -525,14 +524,13 @@ def remove_user_from_session(
 @sessionsRouter.get("", response_model=list[schemas.Session])
 def read_sessions(
     skip: int = 0,
-    limit: int = 100,
     db: Session = Depends(get_db),
     current_user: schemas.User = Depends(get_jwt_user),
 ):
     if check_user_level(current_user, models.UserType.ADMIN):
-        return crud.get_all_sessions(db, skip=skip, limit=limit)
+        return crud.get_all_sessions(db, skip=skip)
 
-    return crud.get_sessions(db, current_user, skip=skip, limit=limit)
+    return crud.get_sessions(db, current_user, skip=skip)
 
 
 @sessionsRouter.post("/{session_id}/satisfy", status_code=status.HTTP_204_NO_CONTENT)
@@ -562,7 +560,6 @@ def create_session_satisfy(
 def read_messages(
     session_id: int,
     skip: int = 0,
-    limit: int = 100,
     db: Session = Depends(get_db),
     current_user: schemas.User = Depends(get_jwt_user),
 ):
@@ -579,7 +576,7 @@ def read_messages(
             detail="You do not have permission to view messages in this session",
         )
 
-    return crud.get_messages(db, session_id, skip=skip, limit=limit)
+    return crud.get_messages(db, session_id, skip=skip)
 
 
 async def send_websoket_message(session_id: int, message: schemas.Message, action: str):
diff --git a/backend/requirements.txt b/backend/requirements.txt
index 99c9046f..b1a43b0a 100644
--- a/backend/requirements.txt
+++ b/backend/requirements.txt
@@ -5,4 +5,3 @@ sqlalchemy>=2.0.0,<2.1.0
 passlib>=1.7.0,<1.8.0
 python-jose>=3.3.0,<3.4.0
 python-multipart>=0.0.0,<0.1.0
-#crypt==4.0.1
-- 
GitLab