From ed76f020c555bc1c9946dbd32f185b24bd0187c3 Mon Sep 17 00:00:00 2001 From: smilerz Date: Mon, 19 Apr 2021 15:32:43 -0500 Subject: [PATCH] fix loading bookmarklet --- cookbook/templates/url_import.html | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cookbook/templates/url_import.html b/cookbook/templates/url_import.html index 4e72b589b..d90b604fb 100644 --- a/cookbook/templates/url_import.html +++ b/cookbook/templates/url_import.html @@ -708,15 +708,12 @@ }) }, loadBookmarklet: function(id_bkmk) { - let uri = window.location.search.substring(1); - let params = new URLSearchParams(uri); - q = params.get("id") this.error = undefined this.loading = true - this.$http.get("{% url 'api:bookmarkletimport-list' %}?id=" + id_bkmk ).then((response) => { + this.$http.get("{% url 'api:bookmarkletimport-detail' 1237654 %}".replace('1237654', id_bkmk)).then((response) => { this.automatic = false - this.source_data = response.data[0]['html'] - this.remote_url = response.data[0]['url'] + this.source_data = response.data['html'] + this.remote_url = response.data['url'] this.loadRecipe() }).catch((err) => { this.error = err.data