diff --git a/endpoints/colour.get.py b/endpoints/colour.get.py index 27c27a1..16100d5 100644 --- a/endpoints/colour.get.py +++ b/endpoints/colour.get.py @@ -1,10 +1,11 @@ -from fastapi import APIRouter, HTTPException, status -from typing import List +from fastapi import APIRouter, status +from datetime import datetime +from schemas.time import TimeSchema router = APIRouter() -@router.get("/colour", status_code=200) -async def get_colour(): - """Get a list of colours""" - colours = ["red", "blue", "green", "yellow", "purple", "orange"] - return {"colours": colours} \ No newline at end of file +@router.get("/colour", status_code=200, response_model=TimeSchema) +async def get_server_time(): + """Get current server time""" + current_time = datetime.now() + return {"timestamp": current_time} \ No newline at end of file