diff --git a/Makefile b/Makefile index d363905..f1635d5 100644 --- a/Makefile +++ b/Makefile @@ -4,5 +4,8 @@ start: down: docker compose -f .docker/docker-compose.yml down +stop: + docker compose -f .docker/docker-compose.yml down -v + build: docker compose -f .docker/docker-compose.yml up --build diff --git a/app/main.py b/app/main.py index 4268cb2..2935832 100644 --- a/app/main.py +++ b/app/main.py @@ -30,6 +30,7 @@ "http://localhost", "http://localhost:5173", "http://localhost:8080", + "https://stars.soujunior.tech", ] app.add_middleware( @@ -138,6 +139,7 @@ def create_volunteer(volunteer: schemas.VolunteerCreate, db: Session = Depends(g if db_user: raise HTTPException(status_code=400, detail="Email already registered") + if volunteer.jobtitle_id <= 0: raise HTTPException(status_code=400, detail="We need jobtitle_id") diff --git a/app/models.py b/app/models.py index 284933c..0b9c3af 100644 --- a/app/models.py +++ b/app/models.py @@ -19,7 +19,9 @@ class Item(Base): id = Column(Integer, primary_key=True) title = Column(String(255), index=True) + description = Column(Text(300), index=True) + owner_id = Column(Integer, ForeignKey("users.id")) owner = relationship("User", back_populates="items") diff --git a/requirements.txt b/requirements.txt index db4335a..d45e264 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,3 +32,4 @@ typing_extensions==4.12.2 urllib3==2.2.3 uvicorn==0.31.1 wheel==0.44.0 +