kopia lustrzana https://github.com/bugout-dev/moonstream
Fixed mypy issue with /now endpoint
rodzic
9d931dd430
commit
a1a962456a
|
@ -4,7 +4,7 @@ The Moonstream HTTP API
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from fastapi import FastAPI, Form
|
from fastapi import FastAPI
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
|
|
||||||
from . import data
|
from . import data
|
||||||
|
@ -41,7 +41,7 @@ async def version_handler() -> data.VersionResponse:
|
||||||
|
|
||||||
|
|
||||||
@app.get("/now", tags=["time"])
|
@app.get("/now", tags=["time"])
|
||||||
async def now_handler() -> int:
|
async def now_handler() -> data.NowResponse:
|
||||||
return data.NowResponse(epoch_time=time.time())
|
return data.NowResponse(epoch_time=time.time())
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue