This commit is contained in:
@@ -1,18 +1,18 @@
|
|||||||
/* Xeslint-disable */
|
/* Xeslint-disable */
|
||||||
import apiUtil from "./gzapi";
|
import gzapi from "./gzapi";
|
||||||
import { processLogin, processLogout } from "./authutil";
|
import { processLogin, processLogout } from "./authutil";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
async authenticate(login, password) {
|
async authenticate(login, password) {
|
||||||
return fetch(
|
return fetch(
|
||||||
apiUtil.APIUrl("auth"),
|
gzapi.APIUrl("auth"),
|
||||||
apiUtil.fetchPostNoAuthOptions({
|
gzapi.fetchPostNoAuthOptions({
|
||||||
login: login,
|
login: login,
|
||||||
password: password
|
password: password
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then(apiUtil.status)
|
.then(gzapi.status)
|
||||||
.then(apiUtil.json)
|
.then(gzapi.json)
|
||||||
.then(processLogin)
|
.then(processLogin)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* ZZeslint-disable */
|
/* ZZeslint-disable */
|
||||||
import store from "../store";
|
import store from "../store";
|
||||||
import apiUtil from "./gzapi";
|
import gzapi from "./gzapi";
|
||||||
import _ from "../libs/lodash.min.js";
|
import _ from "../libs/lodash.min.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -29,9 +29,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//step 2: get it
|
//step 2: get it
|
||||||
fetch(apiUtil.APIUrl("locale/subset"), apiUtil.fetchPostOptions(needIt))
|
fetch(gzapi.APIUrl("locale/subset"), gzapi.fetchPostOptions(needIt))
|
||||||
.then(apiUtil.status)
|
.then(gzapi.status)
|
||||||
.then(apiUtil.json)
|
.then(gzapi.json)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
_.forEach(response.data, function commitFetchedLTItemToStore(item) {
|
_.forEach(response.data, function commitFetchedLTItemToStore(item) {
|
||||||
store.commit("addLocaleText", item);
|
store.commit("addLocaleText", item);
|
||||||
|
|||||||
Reference in New Issue
Block a user