Commit 4231f6f 1 parent d136bf8 commit 4231f6f Copy full SHA for 4231f6f
File tree 1 file changed +1
-3
lines changed
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 1
1
from fastapi import APIRouter , Depends , HTTPException
2
2
from sqlmodel import Session , select
3
3
from typing import List
4
- from src .models import Medicine , User
4
+ from src .models import Medicine
5
5
from src .schemas import (
6
6
MedicineCreate ,
7
7
MedicineRead ,
8
8
MedicineUpdate ,
9
9
MedicineWithHospital ,
10
10
)
11
11
from src .dependencies import get_session
12
- from src .security import get_current_user
13
12
14
13
router = APIRouter (prefix = "/medicines" , tags = ["medicines" ])
15
14
18
17
def create_medicine (
19
18
medicine : MedicineCreate ,
20
19
session : Session = Depends (get_session ),
21
- current_user : User = Depends (get_current_user ),
22
20
):
23
21
db_medicine = Medicine (** medicine .dict ())
24
22
session .add (db_medicine )
You can’t perform that action at this time.
0 commit comments