From b0def99f226b221c73588dc3cc7d30dd9b8852e3 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 17:12:58 +0000 Subject: [PATCH] Add POS endpoint for /user --- endpoints/user.pos.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 endpoints/user.pos.py diff --git a/endpoints/user.pos.py b/endpoints/user.pos.py new file mode 100644 index 0000000..b87b097 --- /dev/null +++ b/endpoints/user.pos.py @@ -0,0 +1,17 @@ +from fastapi import APIRouter, Depends, HTTPException, status +from sqlalchemy.orm import Session +from typing import List +from core.database import get_db +from models.user import User +from schemas.user import UserSchema +from helpers.user_helpers import get_all_users + +router = APIRouter() + +@router.get("/users", status_code=200, response_model=List[UserSchema]) +async def get_users( + db: Session = Depends(get_db) +): + """Get all users""" + users = get_all_users(db) + return users \ No newline at end of file