Chrunos commited on
Commit
6cd1c21
·
verified ·
1 Parent(s): c1005ed

Rename main.py to app.py

Browse files
Files changed (1) hide show
  1. main.py → app.py +6 -1
main.py → app.py RENAMED
@@ -14,7 +14,7 @@ load_dotenv()
14
  INSTAGRAM_USERNAME = os.getenv('INSTAGRAM_USERNAME')
15
  INSTAGRAM_PASSWORD = os.getenv('INSTAGRAM_PASSWORD')
16
 
17
- app = FastAPI(title="Instagram Downloader API")
18
 
19
  class DownloadRequest(BaseModel):
20
  url: str
@@ -50,6 +50,11 @@ def clean_url(url: str) -> Optional[str]:
50
  except Exception:
51
  return None
52
 
 
 
 
 
 
53
  @app.post("/api/download", response_model=DownloadResponse)
54
  async def download_media(request: DownloadRequest):
55
  try:
 
14
  INSTAGRAM_USERNAME = os.getenv('INSTAGRAM_USERNAME')
15
  INSTAGRAM_PASSWORD = os.getenv('INSTAGRAM_PASSWORD')
16
 
17
+ app = FastAPI()
18
 
19
  class DownloadRequest(BaseModel):
20
  url: str
 
50
  except Exception:
51
  return None
52
 
53
+ @app.get('/')
54
+ def main():
55
+ return {"appStatus": "running"}
56
+
57
+
58
  @app.post("/api/download", response_model=DownloadResponse)
59
  async def download_media(request: DownloadRequest):
60
  try: