mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 07:12:42 +02:00
Added Float type to the function parameter values (#77)
This commit is contained in:
parent
7505a0fc1f
commit
7f0fcb372b
26 changed files with 1505 additions and 45 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import random
|
||||
from typing import List
|
||||
from fastapi import FastAPI, HTTPException, Response
|
||||
from datetime import datetime, date, timedelta, timezone
|
||||
import logging
|
||||
from pydantic import BaseModel
|
||||
from utils import load_sql
|
||||
|
|
@ -118,7 +117,7 @@ class TopEmployeesProjects(BaseModel):
|
|||
months_range: int = None # Optional (for filtering recent projects)
|
||||
|
||||
|
||||
@app.post("/top_employees_projects")
|
||||
@app.post("/employees_projects")
|
||||
async def employees_projects(req: TopEmployeesProjects, res: Response):
|
||||
params, filters = {}, []
|
||||
|
||||
|
|
@ -225,8 +224,8 @@ class AvgProjPerformanceRequest(BaseModel):
|
|||
department: str = None # Optional
|
||||
|
||||
|
||||
@app.post("/avg_project_performance")
|
||||
async def avg_project_performance(req: AvgProjPerformanceRequest, res: Response):
|
||||
@app.post("/project_performance")
|
||||
async def project_performance(req: AvgProjPerformanceRequest, res: Response):
|
||||
params, filters = {}, []
|
||||
|
||||
if req.department:
|
||||
|
|
@ -257,7 +256,7 @@ class CertificationsExperienceRequest(BaseModel):
|
|||
min_years_experience: int
|
||||
department: str = None # Optional
|
||||
|
||||
@app.post("/employees_certifications_experience")
|
||||
@app.post("/certifications_experience")
|
||||
async def certifications_experience(req: CertificationsExperienceRequest, res: Response):
|
||||
# Convert the list of certifications into a format for SQL query
|
||||
certs_filter = ', '.join([f"'{cert}'" for cert in req.certifications])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue