diff --git a/backend/moonstream/routes/streams.py b/backend/moonstream/routes/streams.py index be46bc58..b8657f01 100644 --- a/backend/moonstream/routes/streams.py +++ b/backend/moonstream/routes/streams.py @@ -2,6 +2,7 @@ The Moonstream subscriptions HTTP API """ import logging +import time from typing import Dict, List, Optional from bugout.data import BugoutResource @@ -87,6 +88,11 @@ def get_user_subscriptions(token: str) -> Dict[str, List[BugoutResource]]: return user_subscriptions +@app.get("/now", tags=["streams"]) +async def now_handler() -> int: + return int(time.time()) + + @app.get("/", tags=["streams"], response_model=data.GetEventsResponse) async def stream_handler( request: Request,