From c43506b901353416745a973be9b7eb15aeb32d69 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Thu, 20 Mar 2025 14:22:30 +0000 Subject: [PATCH] Update code in endpoints/login.post.py --- endpoints/login.post.py | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/endpoints/login.post.py b/endpoints/login.post.py index 42c1ef5..c85b293 100644 --- a/endpoints/login.post.py +++ b/endpoints/login.post.py @@ -1,7 +1,6 @@ from fastapi import APIRouter, Depends, HTTPException from core.database import fake_users_db import uuid -from typing import Optional router = APIRouter() @@ -10,8 +9,7 @@ async def create_employee( name: str, position: str, email: str, - department: Optional[str] = None, - salary: Optional[float] = None + department: str = "General" ): """Create new employee record""" employee_id = str(uuid.uuid4()) @@ -25,26 +23,22 @@ async def create_employee( "position": position, "email": email, "department": department, - "salary": salary, - "active": True + "active": True, + "created_at": "2024-01-01T00:00:00Z" # Demo date } fake_users_db[employee_id] = employee_data return { "message": "Employee created successfully", - "data": { - "employee_id": employee_id, - "name": name, - "email": email - }, + "data": employee_data, "metadata": { - "created_at": "demo_timestamp", - "department": department - }, - "next_steps": [ - "Complete employee onboarding", - "Assign access credentials", - "Schedule orientation" - ] + "created_id": employee_id, + "department": department, + "next_steps": [ + "Complete employee onboarding", + "Assign workspace", + "Schedule orientation" + ] + } } \ No newline at end of file