create an initialising event fro compose
This commit is contained in:
parent
b520d0d8b2
commit
25c2d2c7c6
2 changed files with 22 additions and 1 deletions
|
|
@ -154,7 +154,16 @@
|
||||||
this.initCamera()
|
this.initCamera()
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
console.log('{{ copilot.id }}')
|
LNbits.api
|
||||||
|
.request(
|
||||||
|
'GET',
|
||||||
|
'/api/v1/copilot/ws/{{ copilot.id }}/initialising/rocket',
|
||||||
|
'filla'
|
||||||
|
)
|
||||||
|
.then(function (response) {})
|
||||||
|
.catch(function (error) {
|
||||||
|
LNbits.utils.notifyApiError(error)
|
||||||
|
})
|
||||||
if (location.protocol !== 'http:') {
|
if (location.protocol !== 'http:') {
|
||||||
this.connection = new WebSocket(
|
this.connection = new WebSocket(
|
||||||
'wss://' +
|
'wss://' +
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import httpx
|
||||||
|
|
||||||
from lnbits.core.crud import get_user
|
from lnbits.core.crud import get_user
|
||||||
from lnbits.decorators import api_check_wallet_key, api_validate_post_request
|
from lnbits.decorators import api_check_wallet_key, api_validate_post_request
|
||||||
|
from .views import updater
|
||||||
|
|
||||||
from . import copilot_ext
|
from . import copilot_ext
|
||||||
|
|
||||||
|
|
@ -91,3 +92,14 @@ async def api_copilot_delete(copilot_id):
|
||||||
await delete_copilot(copilot_id)
|
await delete_copilot(copilot_id)
|
||||||
|
|
||||||
return "", HTTPStatus.NO_CONTENT
|
return "", HTTPStatus.NO_CONTENT
|
||||||
|
|
||||||
|
|
||||||
|
@copilot_ext.route("/api/v1/copilot/ws/<copilot_id>/<comment>/<data>", methods=["GET"])
|
||||||
|
async def api_copilot_retrieve(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)
|
||||||
|
return "", HTTPStatus.OK
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue