diff --git a/lnbits/extensions/twitchalerts/templates/twitchalerts/index.html b/lnbits/extensions/twitchalerts/templates/twitchalerts/index.html index cf64dfb3f..f313c3319 100644 --- a/lnbits/extensions/twitchalerts/templates/twitchalerts/index.html +++ b/lnbits/extensions/twitchalerts/templates/twitchalerts/index.html @@ -50,6 +50,16 @@ icon="link" :color="($q.dark.isActive) ? 'grey-7' : 'grey-5'" type="a" + :href="props.row.authUrl" + target="_blank" + > + @@ -57,16 +67,6 @@ {{ col.value }} - - - ", methods=["DELETE"]) +@api_check_wallet_key("invoice") +async def api_delete_service(service_id): + service = await get_service(service_id) + if not service: + return ( + jsonify({"message": "No service with this ID!"}), + HTTPStatus.NOT_FOUND + ) + if service.wallet != g.wallet.id: + return ( + jsonify({"message": "Not authorized to delete this service!"}), + HTTPStatus.FORBIDDEN + ) + await delete_service(service_id) + + return "", HTTPStatus.NO_CONTENT