Skip to content

Commit

Permalink
remove: auth from the algo
Browse files Browse the repository at this point in the history
  • Loading branch information
soham901 committed Oct 2, 2024
1 parent 4231f6f commit 7d10e1a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/routers/allocation.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
from fastapi import APIRouter, Depends, HTTPException
from sqlmodel import Session, select
from typing import List
from src.models import AllocationResult, MedicineRequest, User
from src.models import AllocationResult
from src.schemas import (
AllocationResultCreate,
AllocationResultRead,
AllocationResult as AllocationResultSchema,
)
from src.dependencies import get_session
from src.security import get_current_user

router = APIRouter(prefix="/allocations", tags=["allocations"])

Expand All @@ -17,7 +16,6 @@
def create_allocation(
allocation: AllocationResultCreate,
session: Session = Depends(get_session),
current_user: User = Depends(get_current_user),
):
db_allocation = AllocationResult(**allocation.dict())
session.add(db_allocation)
Expand All @@ -31,7 +29,6 @@ def read_allocations(
skip: int = 0,
limit: int = 100,
session: Session = Depends(get_session),
current_user: User = Depends(get_current_user),
):
allocations = session.exec(select(AllocationResult).offset(skip).limit(limit)).all()
return allocations
Expand All @@ -41,7 +38,6 @@ def read_allocations(
def read_allocation(
allocation_id: int,
session: Session = Depends(get_session),
current_user: User = Depends(get_current_user),
):
allocation = session.get(AllocationResult, allocation_id)
if allocation is None:
Expand All @@ -53,7 +49,6 @@ def read_allocation(
def delete_allocation(
allocation_id: int,
session: Session = Depends(get_session),
current_user: User = Depends(get_current_user),
):
allocation = session.get(AllocationResult, allocation_id)
if allocation is None:
Expand All @@ -67,7 +62,6 @@ def delete_allocation(
def read_allocation_by_request(
request_id: int,
session: Session = Depends(get_session),
current_user: User = Depends(get_current_user),
):
allocation = session.exec(
select(AllocationResult).where(AllocationResult.request_id == request_id)
Expand Down

0 comments on commit 7d10e1a

Please sign in to comment.