mirror of
https://github.com/a-mayb3/Kanban_clone_backend.git
synced 2026-03-21 18:15:37 +01:00
Started working on projects related endpoints
This commit is contained in:
parent
0b676688c2
commit
abd4d5e988
6 changed files with 93 additions and 63 deletions
16
routers/tasks.py
Normal file
16
routers/tasks.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from typing import List
|
||||
from schemas.tasks import TaskBase
|
||||
from fastapi import APIRouter, HTTPException, Depends
|
||||
|
||||
from database import db_dependency
|
||||
|
||||
import models
|
||||
|
||||
router = APIRouter(prefix="/tasks", tags=["tasks"])
|
||||
|
||||
# """Get tasks from a specified project"""
|
||||
# @router.get("/from_project/{project_id}", response_model=List[TaskBase])
|
||||
# def read_tasks_from_project(project_id: int, db: db_dependency):
|
||||
# db_tasks = db.query(models.Task).filter(models.Task.project_id == project_id).all()
|
||||
# return db_tasks
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue