lnbits/extensions/streamalerts/views_api.py
async def api_delete_service(service_id, g: WalletTypeInfo = Depends(get_key_type)):
    """Delete the service with the given service_id"""
    service = await get_service(service_id)
    if not service:
        raise HTTPException(
            status_code=HTTPStatus.NOT_FOUND, detail="No service with this ID!"
        )
    if service.wallet != g.wallet.id:
        raise HTTPException(
            status_code=HTTPStatus.FORBIDDEN,
            detail="Not authorized to delete this service!",
        )
    await delete_service(service_id)
    raise HTTPException(status_code=HTTPStatus.NO_CONTENT)
Delete the service with the given service_id
Delete the service with the given service_id
Delete the service with the given service_id
async def api_delete_service(service_id, g: WalletTypeInfo = Depends(get_key_type)):
    service = await get_service(service_id)
    if not service:
        raise HTTPException(
            status_code=HTTPStatus.NOT_FOUND, detail="No service with this ID!"
        )
    if service.wallet != g.wallet.id:
        raise HTTPException(
            status_code=HTTPStatus.FORBIDDEN,
            detail="Not authorized to delete this service!",
        )
    await delete_service(service_id)
    raise HTTPException(status_code=HTTPStatus.NO_CONTENT)
async def api_delete_service ( service_id , g : WalletTypeInfo = Depends ( get_key_type ) ) : service = await get_service ( service_id ) if not service : raise HTTPException ( status_code = HTTPStatus . NOT_FOUND , detail = "No service with this ID!" ) if service . wallet != g . wallet . id : raise HTTPException ( status_code = HTTPStatus . FORBIDDEN , detail = "Not authorized to delete this service!" , ) await delete_service ( service_id ) raise HTTPException ( status_code = HTTPStatus . NO_CONTENT )
Delete the service with the given service_id
Delete the service with the given service_id
"""Delete the service with the given service_id"""
service_id
g
WalletTypeInfo