cache folder is now generated on startup

This commit is contained in:
Profitroll 2022-12-11 01:39:19 +01:00
parent 32ebad29ca
commit 091c0abace
4 changed files with 5 additions and 3 deletions

View File

@ -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)

0
cache/.gitkeep vendored
View File

View File

View File

@ -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 *