Update project configuration files, and API routes accordingly. Add SQLite runtime file ignores to .gitignore for better file management.
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |H|e|x|a|H|o|s|t| ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ ║
|
||||
# ║ © 2026 CodeX Devs — All Rights Reserved ║
|
||||
# ║ © 2026 HexaHost — All Rights Reserved ║
|
||||
# ║ ║
|
||||
# ║ discord ── https://discord.gg/codexdev ║
|
||||
# ║ youtube ── https://youtube.com/@CodeXDevs ║
|
||||
# ║ github ── https://github.com/RayExo ║
|
||||
# ║ discord ── https://discord.gg/hexahost ║
|
||||
# ║ github ── https://github.com/theoneandonlymace ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
from utils.db_paths import db_path
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from api.dependencies import get_bot
|
||||
@@ -20,11 +20,11 @@ import os
|
||||
import aiosqlite
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.zyrox import zyrox
|
||||
from core.hexahost import HexaHost
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
CONFIG_DB = "db/admin_config.db"
|
||||
CONFIG_DB = db_path("admin_config.db")
|
||||
|
||||
async def init_db():
|
||||
async with aiosqlite.connect(CONFIG_DB) as db:
|
||||
@@ -38,7 +38,7 @@ import psutil
|
||||
import time
|
||||
|
||||
@router.get("/stats", response_model=AdminStats)
|
||||
async def get_admin_stats(bot: "zyrox" = Depends(get_bot)):
|
||||
async def get_admin_stats(bot: "HexaHost" = Depends(get_bot)):
|
||||
# Calculate DB size and shard info
|
||||
total_size: float = 0.0
|
||||
db_count = 0
|
||||
|
||||
Reference in New Issue
Block a user