Skip to content

Commit

Permalink
Merge pull request #7 from SouJunior/master
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
wouerner authored Oct 22, 2024
2 parents 85289f8 + f476242 commit c2b2a93
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"http://localhost",
"http://localhost:5173",
"http://localhost:8080",
"https://stars.soujunior.tech",
]

app.add_middleware(
Expand Down Expand Up @@ -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")

Expand Down
2 changes: 2 additions & 0 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ typing_extensions==4.12.2
urllib3==2.2.3
uvicorn==0.31.1
wheel==0.44.0

0 comments on commit c2b2a93

Please sign in to comment.