From 8c5d2f1e1da7e0de6ff571632b60c1a88a84d372 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 13 May 2020 22:42:55 +0000 Subject: [PATCH] --- ayanova/src/api/gzapi.js | 8 ++++---- ayanova/src/components/attachment-control.vue | 8 ++++---- ayanova/src/components/wiki-control.vue | 8 ++++---- ayanova/src/views/home-password.vue | 2 +- ayanova/src/views/widget.vue | 2 +- ayanova/tests/e2e/specs/jwt-example.js | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ayanova/src/api/gzapi.js b/ayanova/src/api/gzapi.js index b330a1d4..bb91b94f 100644 --- a/ayanova/src/api/gzapi.js +++ b/ayanova/src/api/gzapi.js @@ -261,15 +261,15 @@ export default { return window.$gz.store.state.apiUrl + apiPath; }, ///////////////////////////// - // Attachment download URL + // attachment download URL // downloadUrl(fileId, ctype) { - //http://localhost:7575/api/v8/Attachment/download/100?t=sssss + //http://localhost:7575/api/v8/attachment/download/100?t=sssss //Ctype is optional and is the MIME content type, used to detect image urls at client for drag and drop ops //in wiki but ignored by server let url = - "Attachment/download/" + + "attachment/download/" + fileId + "?t=" + window.$gz.store.state.downloadToken; @@ -445,7 +445,7 @@ export default { body: data }; - fetch(that.APIUrl("Attachment"), fetchOptions) + fetch(that.APIUrl("attachment"), fetchOptions) .then(that.status) .then(that.json) // eslint-disable-next-line diff --git a/ayanova/src/components/attachment-control.vue b/ayanova/src/components/attachment-control.vue index c3239762..4fd8292e 100644 --- a/ayanova/src/components/attachment-control.vue +++ b/ayanova/src/components/attachment-control.vue @@ -229,7 +229,7 @@ export default { window.$gz.dialog.confirmDelete().then(dialogResult => { if (dialogResult == true) { window.$gz.api - .remove("Attachment/" + vm.editId) + .remove("attachment/" + vm.editId) .then(res => { if (res.error) { window.$gz.errorHandler.handleFormError(res.error); @@ -250,7 +250,7 @@ export default { getList() { let vm = this; window.$gz.api - .get("Attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId) + .get("attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId) .then(res => { if (res.error) { window.$gz.errorHandler.handleFormError(res.error); @@ -274,7 +274,7 @@ export default { let ret = []; for (let i = 0; i < data.length; i++) { let o = data[i]; - //http://localhost:7575/api/v8/Attachment/download/100?t=sssss + //http://localhost:7575/api/v8/attachment/download/100?t=sssss ret.push({ id: o.id, concurrency: o.concurrency, @@ -340,7 +340,7 @@ export default { }; window.$gz.api - .upsert("Attachment/" + vm.editId, p) + .upsert("attachment/" + vm.editId, p) .then(res => { if (res.error) { window.$gz.errorHandler.handleFormError(res.error); diff --git a/ayanova/src/components/wiki-control.vue b/ayanova/src/components/wiki-control.vue index cbe6ece3..9a9e2d25 100644 --- a/ayanova/src/components/wiki-control.vue +++ b/ayanova/src/components/wiki-control.vue @@ -821,7 +821,7 @@ export default { let vm = this; vm.attachments = []; window.$gz.api - .get("Attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId) + .get("attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId) .then(res => { if (res.error) { window.$gz.errorHandler.handleFormError(res.error); @@ -929,12 +929,12 @@ export default { insertUrl(url, name) { if (url) { let isImageUrl = false; - //Attachment? - if (url.includes("Attachment/download/")) { + //attachment? + if (url.includes("attachment/download/")) { //it's an attachment url so fixup accordingly //i paramter added by gzapi::downloadUrl function isImageUrl = url.includes("&i="); - let m = url.match(/Attachment\/download\/(.*)\?t=/); + let m = url.match(/attachment\/download\/(.*)\?t=/); if (m.length > 1) { url = "[ATTACH:" + m[1] + "]"; } else { diff --git a/ayanova/src/views/home-password.vue b/ayanova/src/views/home-password.vue index df338eee..88bff82d 100644 --- a/ayanova/src/views/home-password.vue +++ b/ayanova/src/views/home-password.vue @@ -88,7 +88,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////// const FORM_KEY = "home-password"; -const API_BASE_URL = "Auth/ChangePassword"; +const API_BASE_URL = "auth/changepassword"; export default { created() { diff --git a/ayanova/src/views/widget.vue b/ayanova/src/views/widget.vue index c7327026..39798dd6 100644 --- a/ayanova/src/views/widget.vue +++ b/ayanova/src/views/widget.vue @@ -467,7 +467,7 @@ export default { let vm = this; if (vm.canSave) { vm.formState.loading = true; - let url = API_BASE_URL + vm.$route.params.recordid; + let url = API_BASE_URL;// + vm.$route.params.recordid; //clear any errors vm might be around from previous submit window.$gz.form.deleteAllErrorBoxErrors(vm); diff --git a/ayanova/tests/e2e/specs/jwt-example.js b/ayanova/tests/e2e/specs/jwt-example.js index 774c2dd1..7cf2d7c5 100644 --- a/ayanova/tests/e2e/specs/jwt-example.js +++ b/ayanova/tests/e2e/specs/jwt-example.js @@ -2,7 +2,7 @@ // let user; // before(function fetchUser() { -// cy.request("POST", "http://localhost:7575/api/v8/Auth", { +// cy.request("POST", "http://localhost:7575/api/v8/auth", { // username: Cypress.env("adminusername"), // password: Cypress.env("adminpassword") // })