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 @@
"private": true,
"scripts": {
"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",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
......
......@@ -45,12 +45,12 @@ const projectAPI = {
}
},
async getProjects({ baseUrl, filters, page, projectSlug, ismyaccount }) {
async getProjects({ baseUrl, filters, page, projectSlug, myaccount }) {
let url = `${baseUrl}projects/`;
if (projectSlug) url += `${projectSlug}/`;
url += `?page=${page}`;
if (ismyaccount) {
url += '&ismyaccount';
if (myaccount) {
url += '&myaccount=true';
}
try {
if (Object.values(filters).some(el => el && el.length > 0)) {
......
......@@ -80,7 +80,7 @@ const projects = {
},
async GET_PROJECTS({ state, rootState, commit }, payload) {
let { page, ismyaccount, projectSlug } = payload || {};
let { page, myaccount, projectSlug } = payload || {};
if (!page) {
page = state.currentPage;
}
......@@ -90,7 +90,7 @@ const projects = {
filters : state.filters,
page,
projectSlug,
ismyaccount,
myaccount,
});
commit('SET_PROJECTS', projects);
return;
......
......@@ -420,7 +420,7 @@ export default {
getData(page) {
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)
.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