✨ Outfits
This commit is contained in:
parent
775c833f28
commit
3e6871fb34
127 changed files with 17420 additions and 2 deletions
|
@ -13,7 +13,7 @@ db.bind(provider="sqlite", filename="../../clean/31-2/data.sqlite3")
|
|||
db.generate_mapping()
|
||||
|
||||
|
||||
@route("/<name>")
|
||||
@route("/weapon/<name>")
|
||||
@view("weapon")
|
||||
def weapon(name):
|
||||
with db_session:
|
||||
|
@ -47,6 +47,20 @@ def weapon(name):
|
|||
}
|
||||
|
||||
|
||||
@route("/outfit/<name>")
|
||||
@view("outfit")
|
||||
def weapon(name):
|
||||
with db_session:
|
||||
query = Outfit.select(name=name)
|
||||
outfit = query.first()
|
||||
return {
|
||||
"title": name,
|
||||
"icon": base64.b64encode(outfit.icon),
|
||||
"description": outfit.description,
|
||||
"preview": base64.b64encode(outfit.preview),
|
||||
}
|
||||
|
||||
|
||||
@route("/static/<filepath:path>")
|
||||
def server_static(filepath):
|
||||
return static_file(filepath, root="./static")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue