Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,12 @@
|
|
| 1 |
import os
|
| 2 |
import json
|
| 3 |
from typing import List, Any, Optional
|
| 4 |
-
import uvicorn
|
| 5 |
from fastapi import FastAPI, Header, HTTPException
|
| 6 |
from pydantic import BaseModel
|
| 7 |
import httpx
|
| 8 |
|
| 9 |
app = FastAPI(title="Roblox Data Migration Bridge")
|
| 10 |
|
| 11 |
-
# Secrets configured in HF Space Settings -> Repository secrets
|
| 12 |
OLD_UNIVERSE_ID = os.getenv("OLD_UNIVERSE_ID")
|
| 13 |
NEW_UNIVERSE_ID = os.getenv("NEW_UNIVERSE_ID")
|
| 14 |
OLD_API_KEY = os.getenv("OLD_API_KEY")
|
|
@@ -95,7 +93,4 @@ async def transfer_datastores(payload: TransferRequest, authorization: Optional[
|
|
| 95 |
else:
|
| 96 |
transfer_results[ds] = {"migrated": False, "reason": "No old data found"}
|
| 97 |
|
| 98 |
-
return {"status": "success", "user_id": payload.user_id, "results": transfer_results}
|
| 99 |
-
|
| 100 |
-
if __name__ == "__main__":
|
| 101 |
-
uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=False)
|
|
|
|
| 1 |
import os
|
| 2 |
import json
|
| 3 |
from typing import List, Any, Optional
|
|
|
|
| 4 |
from fastapi import FastAPI, Header, HTTPException
|
| 5 |
from pydantic import BaseModel
|
| 6 |
import httpx
|
| 7 |
|
| 8 |
app = FastAPI(title="Roblox Data Migration Bridge")
|
| 9 |
|
|
|
|
| 10 |
OLD_UNIVERSE_ID = os.getenv("OLD_UNIVERSE_ID")
|
| 11 |
NEW_UNIVERSE_ID = os.getenv("NEW_UNIVERSE_ID")
|
| 12 |
OLD_API_KEY = os.getenv("OLD_API_KEY")
|
|
|
|
| 93 |
else:
|
| 94 |
transfer_results[ds] = {"migrated": False, "reason": "No old data found"}
|
| 95 |
|
| 96 |
+
return {"status": "success", "user_id": payload.user_id, "results": transfer_results}
|
|
|
|
|
|
|
|
|