Changed permission for deleting,
This commit is contained in:
parent
39561efe38
commit
71a6d90283
2 changed files with 6 additions and 3 deletions
|
|
@ -155,12 +155,15 @@
|
|||
><span class="text-blue">GET</span>
|
||||
/api/v1/copilot/ws/<copilot_id>/<comment>/<data></code
|
||||
>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
||||
<code>{"X-Api-Key": <admin_key>}</code><br />
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Returns 200</h5>
|
||||
<code></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>curl -X GET {{ request.url_root }}/api/v1/copilot/ws/<string,
|
||||
copilot_id>/<string, comment>/<string, gif name>
|
||||
copilot_id>/<string, comment>/<string, gif name> -H
|
||||
"X-Api-Key: {{ g.user.wallets[0].adminkey }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ async def api_copilot_retrieve(copilot_id):
|
|||
|
||||
|
||||
@copilot_ext.route("/api/v1/copilot/<copilot_id>", methods=["DELETE"])
|
||||
@api_check_wallet_key("invoice")
|
||||
@api_check_wallet_key("admin")
|
||||
async def api_copilot_delete(copilot_id):
|
||||
copilot = await get_copilot(copilot_id)
|
||||
|
||||
|
|
@ -95,11 +95,11 @@ async def api_copilot_delete(copilot_id):
|
|||
|
||||
|
||||
@copilot_ext.route("/api/v1/copilot/ws/<copilot_id>/<comment>/<data>", methods=["GET"])
|
||||
@api_check_wallet_key("admin")
|
||||
async def api_copilot_ws_relay(copilot_id, comment, data):
|
||||
copilot = await get_copilot(copilot_id)
|
||||
|
||||
if not copilot:
|
||||
return jsonify({"message": "copilot does not exist"}), HTTPStatus.NOT_FOUND
|
||||
await updater(data, comment, copilot_id)
|
||||
print(comment)
|
||||
return "", HTTPStatus.OK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue