feat: Update endpoint colour

This commit is contained in:
Backend IM Bot 2025-03-28 18:35:36 +00:00
parent 7ae53e2620
commit 942e97b015

View File

@ -1,10 +1,11 @@
from fastapi import APIRouter, HTTPException, status from fastapi import APIRouter, status
from typing import List from datetime import datetime
from schemas.time import TimeSchema
router = APIRouter() router = APIRouter()
@router.get("/colour", status_code=200) @router.get("/colour", status_code=200, response_model=TimeSchema)
async def get_colour(): async def get_server_time():
"""Get a list of colours""" """Get current server time"""
colours = ["red", "blue", "green", "yellow", "purple", "orange"] current_time = datetime.now()
return {"colours": colours} return {"timestamp": current_time}