from typing import List
from fastapi import APIRouter, Depends
from sqlmodel import select, Session
from app.models import *
from utils import get_session

router = APIRouter()

@router.get("/users", response_model=List[UserRead])
async def get_users(*, session: Session=Depends(get_session)):
    statement = select(User)
    results = session.exec(statement).all()
        
    return results

@router.post("/tasks", response_model=List[TaskRead])
async def get_tasks(user: UserQuery, session: Session=Depends(get_session)):
    statement = 