mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-08 04:43:00 +08:00
fix admin page error
This commit is contained in:
parent
319ffc8a45
commit
e078f27ae2
@ -45,10 +45,10 @@ class SinglePageApplication(StaticFiles):
|
|||||||
self.index = index
|
self.index = index
|
||||||
super().__init__(directory=directory, packages=None, html=True, check_dir=True)
|
super().__init__(directory=directory, packages=None, html=True, check_dir=True)
|
||||||
|
|
||||||
async def lookup_path(self, path: str) -> tuple[str, Union[os.stat_result, None]]:
|
def lookup_path(self, path: str) -> tuple[str, Union[os.stat_result, None]]:
|
||||||
full_path, stat_res = await super().lookup_path(path)
|
full_path, stat_res = super().lookup_path(path)
|
||||||
if stat_res is None:
|
if stat_res is None:
|
||||||
return await super().lookup_path(self.index)
|
return super().lookup_path(self.index)
|
||||||
return (full_path, stat_res)
|
return (full_path, stat_res)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user