Skip to content

Commit de4ee82

Browse files
authored
reverted
1 parent 7b13e87 commit de4ee82

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

__init__.py

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,25 @@
1-
from http import HTTPStatus
2-
3-
from starlette.exceptions import HTTPException
4-
51
from fastapi import APIRouter
62
from fastapi.staticfiles import StaticFiles
73

84
from lnbits.db import Database
95
from lnbits.helpers import template_renderer
106

11-
from os.path import exists
12-
13-
if exists(..satspay.models.py):
14-
db = Database("ext_tipjar")
7+
db = Database("ext_tipjar")
158

16-
tipjar_ext: APIRouter = APIRouter(prefix="/tipjar", tags=["tipjar"])
9+
tipjar_ext: APIRouter = APIRouter(prefix="/tipjar", tags=["tipjar"])
1710

18-
tipjar_static_files = [
19-
{
20-
"path": "/tipjar/static",
21-
"app": StaticFiles(directory="lnbits/extensions/tipjar/static"),
22-
"name": "tipjar_static",
23-
}
24-
]
11+
tipjar_static_files = [
12+
{
13+
"path": "/tipjar/static",
14+
"app": StaticFiles(directory="lnbits/extensions/tipjar/static"),
15+
"name": "tipjar_static",
16+
}
17+
]
2518

2619

27-
def tipjar_renderer():
28-
return template_renderer(["lnbits/extensions/tipjar/templates"])
20+
def tipjar_renderer():
21+
return template_renderer(["lnbits/extensions/tipjar/templates"])
2922

30-
from .views import * # noqa: F401,F403
31-
from .views_api import * # noqa: F401,F403
32-
else:
33-
raise HTTPException(
34-
status_code=HTTPStatus.NOT_FOUND, detail="Tipjar does not exist."
35-
)
3623

24+
from .views import * # noqa: F401,F403
25+
from .views_api import * # noqa: F401,F403

0 commit comments

Comments
 (0)