refactor: move api calls to routes folder; feat: add update_banner user-friendly method; fix: change file data type

This commit is contained in:
firedotguy
2026-01-30 15:16:29 +03:00
parent d27db1d905
commit 49427a5535
13 changed files with 27 additions and 14 deletions

View File

@@ -1,9 +1,11 @@
from _io import BufferedReader
from requests import Session
s = Session()
def fetch(token: str, method: str, url: str, params: dict = {}, files: dict[str, tuple[str, bytes]] = {}):
def fetch(token: str, method: str, url: str, params: dict = {}, files: dict[str, tuple[str, BufferedReader]] = {}):
base = f'https://xn--d1ah4a.com/api/{url}'
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",