Skip to content

Commit a0def7e

Browse files
authored
Merge pull request #5 from MirrorChyan/dev
2 parents a5918d4 + e3caf90 commit a0def7e

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
from fastapi import FastAPI
2+
from fastapi.staticfiles import StaticFiles
3+
24
from src.anno import router as anno_router
35
from src.plan import router as plan_router
46
from src.health_check import router as health_check_router
57
from src.project import router as project_router
68

79
app = FastAPI()
810

11+
app.mount("/static", StaticFiles(directory="/app/static"), name="static")
12+
913
app.include_router(anno_router)
1014
app.include_router(plan_router)
1115
app.include_router(health_check_router)

src/database/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class Project(Model):
6565
image = TextField()
6666
url = TextField()
6767
platform = TextField()
68+
download = BooleanField()
6869
available = BooleanField()
6970

7071
class Meta:

src/project/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ async def query_project(type_id: str = "GameTools"):
4141
"support": [
4242
platform.strip() for platform in p.platform.split(",") if platform.strip()
4343
],
44+
"download": p.download,
4445
}
4546
for p in project_cache[0]
4647
if p.type_id == type_id

0 commit comments

Comments
 (0)