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 import FastAPI, HTTPException
from fastapi.responses import FileResponse, JSONResponse from fastapi.responses import FileResponse, JSONResponse
from starlette.status import HTTP_404_NOT_FOUND from starlette.status import HTTP_404_NOT_FOUND
from modules.utils import configGet 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 = FastAPI(title="HoloUA Avatars API", docs_url=None, redoc_url=None, version="1.0")
@app.get("/check", response_class=JSONResponse, include_in_schema=False) @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.utils import *
from modules.inline import * from modules.inline import *
from app import app from app import app
@ -6,9 +6,9 @@ from app import app
from modules.commands_register import commands_register from modules.commands_register import commands_register
from pyrogram import idle from pyrogram import idle
pid = getpid() pid = getpid()
makedirs(f'{configGet("cache", "locations")}{sep}avatars', exist_ok=True)
# Importing # Importing
from modules.commands.application import * from modules.commands.application import *