Skip to content
Snippets Groups Projects
Commit d8417ab8 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix query string myaccount wrong name and invalid query string

parent f3a69857
No related branches found
No related tags found
2 merge requests!424version 3.1.0,!315REDMINE_ISSUE-13183
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "npm run init-proxy & npm run init-serve", "serve": "npm run init-proxy & npm run init-serve",
"init-proxy": "lcp --proxyUrl http://localhost:8000 --origin http://localhost:8080 --proxyPartial ''", "init-proxy": "lcp --proxyUrl http://127.0.0.1:8000 --origin http://localhost:8080 --proxyPartial ''",
"init-serve": "vue-cli-service serve", "init-serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
......
...@@ -45,12 +45,12 @@ const projectAPI = { ...@@ -45,12 +45,12 @@ const projectAPI = {
} }
}, },
async getProjects({ baseUrl, filters, page, projectSlug, ismyaccount }) { async getProjects({ baseUrl, filters, page, projectSlug, myaccount }) {
let url = `${baseUrl}projects/`; let url = `${baseUrl}projects/`;
if (projectSlug) url += `${projectSlug}/`; if (projectSlug) url += `${projectSlug}/`;
url += `?page=${page}`; url += `?page=${page}`;
if (ismyaccount) { if (myaccount) {
url += '&ismyaccount'; url += '&myaccount=true';
} }
try { try {
if (Object.values(filters).some(el => el && el.length > 0)) { if (Object.values(filters).some(el => el && el.length > 0)) {
......
...@@ -80,7 +80,7 @@ const projects = { ...@@ -80,7 +80,7 @@ const projects = {
}, },
async GET_PROJECTS({ state, rootState, commit }, payload) { async GET_PROJECTS({ state, rootState, commit }, payload) {
let { page, ismyaccount, projectSlug } = payload || {}; let { page, myaccount, projectSlug } = payload || {};
if (!page) { if (!page) {
page = state.currentPage; page = state.currentPage;
} }
...@@ -90,7 +90,7 @@ const projects = { ...@@ -90,7 +90,7 @@ const projects = {
filters : state.filters, filters : state.filters,
page, page,
projectSlug, projectSlug,
ismyaccount, myaccount,
}); });
commit('SET_PROJECTS', projects); commit('SET_PROJECTS', projects);
return; return;
......
...@@ -420,7 +420,7 @@ export default { ...@@ -420,7 +420,7 @@ export default {
getData(page) { getData(page) {
this.projectsLoading = true; this.projectsLoading = true;
this.GET_PROJECTS({ ismyaccount: true, projectSlug: this.$route.params.slug, page }) this.GET_PROJECTS({ myaccount: true, projectSlug: this.$route.params.slug, page })
.then(() => this.projectsLoading = false) .then(() => this.projectsLoading = false)
.catch(() => this.projectsLoading = false); .catch(() => this.projectsLoading = false);
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment