Update code in endpoints/colour.get.py

This commit is contained in:
Backend IM Bot 2025-03-28 18:33:24 +00:00
parent 0fd4948398
commit 7ae53e2620

View File

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