added docs for ws api point

This commit is contained in:
Ben Arc
2021-04-20 10:45:54 +01:00
parent 25c2d2c7c6
commit 8422dadcc5
2 changed files with 24 additions and 1 deletions

View File

@@ -142,5 +142,28 @@
</q-card-section>
</q-card>
</q-expansion-item>
<q-expansion-item
group="api"
dense
expand-separator
label="Trigger an animation"
class="q-pb-md"
>
<q-card>
<q-card-section>
<code
><span class="text-blue">GET</span>
/api/v1/copilot/ws/&lt;copilot_id&gt;/&lt;comment&gt;/&lt;data&gt;</code
>
<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/&lt;string,
copilot_id&gt;/&lt;string, comment&gt;/&lt;string, gif name&gt;
</code>
</q-card-section>
</q-card>
</q-expansion-item>
</q-expansion-item>
</q-card>

View File

@@ -95,7 +95,7 @@ async def api_copilot_delete(copilot_id):
@copilot_ext.route("/api/v1/copilot/ws/<copilot_id>/<comment>/<data>", methods=["GET"])
async def api_copilot_retrieve(copilot_id, comment, data):
async def api_copilot_ws_relay(copilot_id, comment, data):
copilot = await get_copilot(copilot_id)
if not copilot: