Add POS endpoint for /user

This commit is contained in:
Backend IM Bot 2025-03-28 17:12:58 +00:00
parent 37677f3b04
commit b0def99f22

17
endpoints/user.pos.py Normal file
View File

@ -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