feat: Update endpoint colour
This commit is contained in:
parent
7ae53e2620
commit
942e97b015
@ -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}
|
Loading…
x
Reference in New Issue
Block a user