This commit is contained in:
2019-04-29 23:19:23 +00:00
parent 88776817cb
commit 6e54a92ccb
2 changed files with 9 additions and 9 deletions

View File

@@ -1,18 +1,18 @@
/* Xeslint-disable */
import apiUtil from "./gzapi";
import gzapi from "./gzapi";
import { processLogin, processLogout } from "./authutil";
export default {
async authenticate(login, password) {
return fetch(
apiUtil.APIUrl("auth"),
apiUtil.fetchPostNoAuthOptions({
gzapi.APIUrl("auth"),
gzapi.fetchPostNoAuthOptions({
login: login,
password: password
})
)
.then(apiUtil.status)
.then(apiUtil.json)
.then(gzapi.status)
.then(gzapi.json)
.then(processLogin)
.then(() => {
return Promise.resolve(true);

View File

@@ -1,6 +1,6 @@
/* ZZeslint-disable */
import store from "../store";
import apiUtil from "./gzapi";
import gzapi from "./gzapi";
import _ from "../libs/lodash.min.js";
export default {
@@ -29,9 +29,9 @@ export default {
}
//step 2: get it
fetch(apiUtil.APIUrl("locale/subset"), apiUtil.fetchPostOptions(needIt))
.then(apiUtil.status)
.then(apiUtil.json)
fetch(gzapi.APIUrl("locale/subset"), gzapi.fetchPostOptions(needIt))
.then(gzapi.status)
.then(gzapi.json)
.then(response => {
_.forEach(response.data, function commitFetchedLTItemToStore(item) {
store.commit("addLocaleText", item);