diff --git a/api_avatars.py b/api_avatars.py index e4014c1..d162076 100644 --- a/api_avatars.py +++ b/api_avatars.py @@ -1,9 +1,11 @@ -from os import path, sep +from os import makedirs, path, sep from fastapi import FastAPI, HTTPException from fastapi.responses import FileResponse, JSONResponse from starlette.status import HTTP_404_NOT_FOUND from modules.utils import configGet +makedirs(f'{configGet("cache", "locations")}{sep}avatars', exist_ok=True) + app = FastAPI(title="HoloUA Avatars API", docs_url=None, redoc_url=None, version="1.0") @app.get("/check", response_class=JSONResponse, include_in_schema=False) diff --git a/cache/.gitkeep b/cache/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/cache/avatars/.gitkeep b/cache/avatars/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/holochecker.py b/holochecker.py index 7cc93a8..6cc31c9 100644 --- a/holochecker.py +++ b/holochecker.py @@ -1,4 +1,4 @@ -from os import getpid +from os import getpid, makedirs from modules.utils import * from modules.inline import * from app import app @@ -6,9 +6,9 @@ from app import app from modules.commands_register import commands_register from pyrogram import idle - pid = getpid() +makedirs(f'{configGet("cache", "locations")}{sep}avatars', exist_ok=True) # Importing from modules.commands.application import *