Skip to content

Commit 7d10e1a

Browse files
committed
remove: auth from the algo
1 parent 4231f6f commit 7d10e1a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/routers/allocation.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
from fastapi import APIRouter, Depends, HTTPException
22
from sqlmodel import Session, select
33
from typing import List
4-
from src.models import AllocationResult, MedicineRequest, User
4+
from src.models import AllocationResult
55
from src.schemas import (
66
AllocationResultCreate,
77
AllocationResultRead,
88
AllocationResult as AllocationResultSchema,
99
)
1010
from src.dependencies import get_session
11-
from src.security import get_current_user
1211

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

@@ -17,7 +16,6 @@
1716
def create_allocation(
1817
allocation: AllocationResultCreate,
1918
session: Session = Depends(get_session),
20-
current_user: User = Depends(get_current_user),
2119
):
2220
db_allocation = AllocationResult(**allocation.dict())
2321
session.add(db_allocation)
@@ -31,7 +29,6 @@ def read_allocations(
3129
skip: int = 0,
3230
limit: int = 100,
3331
session: Session = Depends(get_session),
34-
current_user: User = Depends(get_current_user),
3532
):
3633
allocations = session.exec(select(AllocationResult).offset(skip).limit(limit)).all()
3734
return allocations
@@ -41,7 +38,6 @@ def read_allocations(
4138
def read_allocation(
4239
allocation_id: int,
4340
session: Session = Depends(get_session),
44-
current_user: User = Depends(get_current_user),
4541
):
4642
allocation = session.get(AllocationResult, allocation_id)
4743
if allocation is None:
@@ -53,7 +49,6 @@ def read_allocation(
5349
def delete_allocation(
5450
allocation_id: int,
5551
session: Session = Depends(get_session),
56-
current_user: User = Depends(get_current_user),
5752
):
5853
allocation = session.get(AllocationResult, allocation_id)
5954
if allocation is None:
@@ -67,7 +62,6 @@ def delete_allocation(
6762
def read_allocation_by_request(
6863
request_id: int,
6964
session: Session = Depends(get_session),
70-
current_user: User = Depends(get_current_user),
7165
):
7266
allocation = session.exec(
7367
select(AllocationResult).where(AllocationResult.request_id == request_id)

0 commit comments

Comments
 (0)