Merge pull request #404 from arcbtc/FastAPI

Added some IF EXISTS
This commit is contained in:
Arc 2021-11-09 20:54:20 +00:00 committed by GitHub
commit 1f4d5f4380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -109,3 +109,5 @@ async def migrate_databases():
async with ext_db.connect() as ext_conn:
await run_migration(ext_conn, ext_migrations)
print(" ✔️ All migrations done.")

View File

@ -320,7 +320,7 @@ async def subscribe(request: Request, wallet: Wallet):
@core_app.get("/api/v1/payments/sse")
async def api_payments_sse(
request: Request, wallet: WalletTypeInfo = Depends(WalletAdminKeyChecker())
request: Request, wallet: WalletTypeInfo = Depends(get_key_type)
):
return EventSourceResponse(
subscribe(request, wallet), ping=20, media_type="text/event-stream"