Skip to content

Commit

Permalink
Error out the invite routes for now.
Browse files Browse the repository at this point in the history
We need to add proper access control for these.
  • Loading branch information
MelissaAutumn committed Apr 17, 2024
1 parent 08cc065 commit 14f9156
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/appointment/routes/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@

@router.post("/generate/{n}", response_model=list[schemas.Invite])
def generate_invite_codes(n: int, db: Session = Depends(get_db)):
raise NotImplementedError
"""endpoint to generate n invite codes"""
return repo.generate_invite_codes(db, n)


@router.put("/redeem/{code}")
def use_invite_code(code: str, db: Session = Depends(get_db)):
raise NotImplementedError

"""endpoint to create a new subscriber and update the corresponding invite"""
if not repo.invite_code_exists(db, code):
raise validation.InviteCodeNotFoundException()
Expand All @@ -33,6 +36,7 @@ def use_invite_code(code: str, db: Session = Depends(get_db)):

@router.put("/revoke/{code}")
def use_invite_code(code: str, db: Session = Depends(get_db)):
raise NotImplementedError
"""endpoint to revoke a given invite code and mark in unavailable"""
if not repo.invite_code_exists(db, code):
raise validation.InviteCodeNotFoundException()
Expand Down

0 comments on commit 14f9156

Please sign in to comment.