Simplifies database queries and updates auth
Removes the `castle.` prefix from database table names in queries, streamlining data access. Updates authentication to use `WalletTypeInfo` dependency injection for retrieving wallet information. This improves security and aligns with LNBits' authentication patterns. Also modifies the main router's tag to uppercase.
This commit is contained in:
parent
cdd0cda001
commit
5589d813f0
3 changed files with 39 additions and 35 deletions
|
|
@ -1,9 +1,10 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from .crud import db
|
||||
from .views import castle_generic_router
|
||||
from .views_api import castle_api_router
|
||||
|
||||
castle_ext: APIRouter = APIRouter(prefix="/castle", tags=["castle"])
|
||||
castle_ext: APIRouter = APIRouter(prefix="/castle", tags=["Castle"])
|
||||
castle_ext.include_router(castle_generic_router)
|
||||
castle_ext.include_router(castle_api_router)
|
||||
|
||||
|
|
@ -14,4 +15,4 @@ castle_static_files = [
|
|||
}
|
||||
]
|
||||
|
||||
__all__ = ["castle_ext", "castle_static_files"]
|
||||
__all__ = ["castle_ext", "castle_static_files", "db"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue