# Entity: Project from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session from core.database import get_db from models.project import Project from schemas.project import ProjectSchema, ProjectCreate from helpers.project_helpers import create_project router = APIRouter() @router.post("/projects", status_code=status.HTTP_201_CREATED, response_model=ProjectSchema) async def add_project( project: ProjectCreate, db: Session = Depends(get_db) ): """Add a new final year project""" new_project = create_project(db=db, project=project) return new_project