From adf7a53a9f9734750eee2425568a527eb686c7f8 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 27 Feb 2023 20:55:49 -0500 Subject: [PATCH] Easy subfolder mounting --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b8c8ecf..7d595f8 100644 --- a/main.py +++ b/main.py @@ -39,8 +39,12 @@ async def get_sticker(request): return result app = web.Application() -app.add_routes([web.get('/{pack},{key}', get_pack), - web.get('/{pack},{key}/{sticker}', get_sticker)]) +app.add_routes([ + web.get('/{pack},{key}', get_pack), + web.get('/{pack},{key}/{sticker}', get_sticker), + web.get('/{subdir}/{pack},{key}', get_pack), + web.get('/{subdir}/{pack},{key}/{sticker}', get_sticker) +]) if __name__ == '__main__': web.run_app(app, path=sys.argv[1]) -- 2.38.5