Fork of satmachineadmin's v2-bitspire line into its own repo. Renames
both identifiers so this extension is fully independent of the original
satmachineadmin install (which remains in service):
- extension id satmachineadmin -> spirekeeper
(router prefix, static path/static_url_for, module symbols, task
names, templates dir, config/manifest paths)
- database name satoshimachine -> spirekeeper
(Database(ext_spirekeeper), all schema-qualified table refs)
Also resets versioning to 0.1.0, sets the display name + manifest to
spirekeeper/aiolabs, and fixes the placeholder pyproject description.
Historical aiolabs/satmachineadmin#N issue references in comments are
left pointing at the original repo where those issues live.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 lines
893 B
Python
25 lines
893 B
Python
# Satoshi Machine v2 — page route.
|
|
#
|
|
# v2 is operator-installable (any LNbits user, not super-only). The super-only
|
|
# check in v1's index() is gone. Super-only controls (platform fee config)
|
|
# move to a dedicated API endpoint protected by check_super_user in P1.
|
|
|
|
from fastapi import APIRouter, Depends, Request
|
|
from fastapi.responses import HTMLResponse
|
|
from lnbits.core.models import User
|
|
from lnbits.decorators import check_user_exists
|
|
from lnbits.helpers import template_renderer
|
|
|
|
spirekeeper_generic_router = APIRouter()
|
|
|
|
|
|
def spirekeeper_renderer():
|
|
return template_renderer(["spirekeeper/templates"])
|
|
|
|
|
|
@spirekeeper_generic_router.get("/", response_class=HTMLResponse)
|
|
async def index(req: Request, user: User = Depends(check_user_exists)):
|
|
return spirekeeper_renderer().TemplateResponse(
|
|
"spirekeeper/index.html",
|
|
{"request": req, "user": user.json()},
|
|
)
|