Skip to content

Commit

Permalink
Add statics api
Browse files Browse the repository at this point in the history
  • Loading branch information
daya0576 committed Nov 20, 2024
1 parent 9d31ca2 commit 9ec9cc8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion beaverhabits/main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import asyncio
import logging
from contextlib import asynccontextmanager
import logging

from fastapi import FastAPI
import sentry_sdk

from beaverhabits.app import crud

from .app.app import init_auth_routes
from .app.db import create_db_and_tables
from .configs import settings
Expand Down Expand Up @@ -38,6 +40,11 @@ def read_root():
return {"Hello": "World"}


@app.get("/user/count")
async def user_count():
return {"count": await crud.get_user_count()}


# auth
init_auth_routes(app)
init_gui_routes(app)
Expand Down

0 comments on commit 9ec9cc8

Please sign in to comment.