This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user