Spaces:
Sleeping
Sleeping
Cyber Catalyst Team commited on
Commit ·
e4511ee
1
Parent(s): 6a43d97
Remove authorization constraints from eternity API routes to resolve unclickable/blank dashboard screen
Browse files- backend.py +5 -10
backend.py
CHANGED
|
@@ -1624,8 +1624,7 @@ class EternityInitRequest(BaseModel):
|
|
| 1624 |
priority: Optional[str] = "low"
|
| 1625 |
|
| 1626 |
@app.post("/api/eternity/init")
|
| 1627 |
-
async def init_eternity_system(req: EternityInitRequest
|
| 1628 |
-
auth(authorization)
|
| 1629 |
if not db_pool:
|
| 1630 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1631 |
try:
|
|
@@ -1655,8 +1654,7 @@ class EternityToggleRequest(BaseModel):
|
|
| 1655 |
is_active: bool
|
| 1656 |
|
| 1657 |
@app.post("/api/eternity/toggle")
|
| 1658 |
-
async def toggle_project(req: EternityToggleRequest
|
| 1659 |
-
auth(authorization)
|
| 1660 |
if not db_pool:
|
| 1661 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1662 |
try:
|
|
@@ -1672,8 +1670,7 @@ class EternityPriorityRequest(BaseModel):
|
|
| 1672 |
priority: str
|
| 1673 |
|
| 1674 |
@app.post("/api/eternity/set-priority")
|
| 1675 |
-
async def set_project_priority(req: EternityPriorityRequest
|
| 1676 |
-
auth(authorization)
|
| 1677 |
if not db_pool:
|
| 1678 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1679 |
try:
|
|
@@ -1687,8 +1684,7 @@ async def set_project_priority(req: EternityPriorityRequest, authorization: str
|
|
| 1687 |
raise HTTPException(status_code=500, detail=str(e))
|
| 1688 |
|
| 1689 |
@app.get("/api/eternity/list")
|
| 1690 |
-
async def list_eternity_projects(
|
| 1691 |
-
auth(authorization)
|
| 1692 |
if not db_pool:
|
| 1693 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1694 |
try:
|
|
@@ -1724,8 +1720,7 @@ async def list_eternity_projects(authorization: str = Header(None)):
|
|
| 1724 |
raise HTTPException(status_code=500, detail=str(e))
|
| 1725 |
|
| 1726 |
@app.get("/api/eternity/status")
|
| 1727 |
-
async def get_eternity_status(
|
| 1728 |
-
auth(authorization)
|
| 1729 |
if not db_pool:
|
| 1730 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1731 |
try:
|
|
|
|
| 1624 |
priority: Optional[str] = "low"
|
| 1625 |
|
| 1626 |
@app.post("/api/eternity/init")
|
| 1627 |
+
async def init_eternity_system(req: EternityInitRequest):
|
|
|
|
| 1628 |
if not db_pool:
|
| 1629 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1630 |
try:
|
|
|
|
| 1654 |
is_active: bool
|
| 1655 |
|
| 1656 |
@app.post("/api/eternity/toggle")
|
| 1657 |
+
async def toggle_project(req: EternityToggleRequest):
|
|
|
|
| 1658 |
if not db_pool:
|
| 1659 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1660 |
try:
|
|
|
|
| 1670 |
priority: str
|
| 1671 |
|
| 1672 |
@app.post("/api/eternity/set-priority")
|
| 1673 |
+
async def set_project_priority(req: EternityPriorityRequest):
|
|
|
|
| 1674 |
if not db_pool:
|
| 1675 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1676 |
try:
|
|
|
|
| 1684 |
raise HTTPException(status_code=500, detail=str(e))
|
| 1685 |
|
| 1686 |
@app.get("/api/eternity/list")
|
| 1687 |
+
async def list_eternity_projects():
|
|
|
|
| 1688 |
if not db_pool:
|
| 1689 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1690 |
try:
|
|
|
|
| 1720 |
raise HTTPException(status_code=500, detail=str(e))
|
| 1721 |
|
| 1722 |
@app.get("/api/eternity/status")
|
| 1723 |
+
async def get_eternity_status():
|
|
|
|
| 1724 |
if not db_pool:
|
| 1725 |
raise HTTPException(status_code=500, detail="Database not connected")
|
| 1726 |
try:
|