mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-25 00:25:04 +08:00
✨ output to latest
This commit is contained in:
parent
e843d790b1
commit
6d3d3fc52c
@ -2,6 +2,9 @@ from fastapi import FastAPI
|
|||||||
from nonebot import get_app
|
from nonebot import get_app
|
||||||
from .restful_api import *
|
from .restful_api import *
|
||||||
|
|
||||||
@app.get("/")
|
|
||||||
|
@app.get("/ping")
|
||||||
async def root():
|
async def root():
|
||||||
return {"message": "Hello World"}
|
return {
|
||||||
|
"message": "pong"
|
||||||
|
}
|
||||||
|
@ -73,7 +73,7 @@ async def template2image(
|
|||||||
template_path=template_path,
|
template_path=template_path,
|
||||||
**templates,
|
**templates,
|
||||||
)
|
)
|
||||||
async with aiofiles.open(os.path.join(template_path, "latest-debug.html"), "w", encoding="utf-8") as f:
|
async with aiofiles.open(os.path.join(template_path, f"debug-{random_hex_string(6)}.html"), "w", encoding="utf-8") as f:
|
||||||
await f.write(raw_html)
|
await f.write(raw_html)
|
||||||
nonebot.logger.info("Debug HTML: %s" % f"debug-{random_hex_string(6)}.html")
|
nonebot.logger.info("Debug HTML: %s" % f"debug-{random_hex_string(6)}.html")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user