Skip to content

Commit

Permalink
Updated the file in response to the PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
codeshwar-preview[bot] authored Mar 16, 2024
1 parent 802e749 commit e5a7fcd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions API/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from fastapi import APIRouter, HTTPException, Response
from matplotlib import pyplot as plt
from PIL import Image
from pydantic import BaseModel

from API.database import Database
from API.utils import init_logging_config
Expand All @@ -21,11 +20,13 @@

router = APIRouter()


client = Database()

collection = "faceEntries"


# Models for the data to be sent and received by the server
# Models for the data to be sent and received by the server
class Employee(BaseModel):
EmployeeCode: int
Name: str
Expand Down Expand Up @@ -103,7 +104,7 @@ async def create_new_faceEntry(Employee: Employee):


# To display all records
@router.get("/Data/", response_model=List[Employee])
@router.get("/Data/", response_model=list[Employee])
async def get_employees():
"""
Retrieve a list of employees from the database.
Expand Down

0 comments on commit e5a7fcd

Please sign in to comment.