Render skip

This commit is contained in:
Khrysse 2025-06-22 12:07:56 +02:00
parent 4992a39411
commit 7d37cf0409
3 changed files with 8 additions and 2 deletions

View File

@ -1,2 +1,3 @@
CLIENT_NAME="YourAPINme (Dev)/1.0"
VRCHAT_API_BASE="https://api.vrchat.cloud/api/1"
VRCHAT_API_BASE="https://api.vrchat.cloud/api/1"
IS_RENDER=False

View File

@ -6,3 +6,4 @@ load_dotenv(dotenv_path=Path(__file__).parent.parent / ".env")
CLIENT_NAME = os.getenv("CLIENT_NAME", "default-client-name")
API_BASE = os.getenv("VRCHAT_API_BASE", "https://api.vrchat.cloud/api/1")
TOKEN_FILE = Path(os.getenv("TOKEN_FILE", "data/auth/account.json"))
IS_RENDER = os.getenv("IS_RENDER", "false").lower() in ("true", "1", "t")

View File

@ -6,7 +6,11 @@ import sys
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parent.parent))
from env import CLIENT_NAME, API_BASE, TOKEN_FILE
from env import CLIENT_NAME, API_BASE, TOKEN_FILE, IS_RENDER
if IS_RENDER:
print("⚠️ Running in Render environment, skipping VRChat auth.")
sys.exit(0)
def save_token(data):
data["created_at"] = datetime.now(timezone.utc).isoformat()