This commit is contained in:
2019-07-24 14:55:13 +00:00
parent 9389035bb9
commit 604fe1dd72
3 changed files with 8 additions and 8 deletions

View File

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

View File

@@ -1,5 +1,5 @@
/* xeslint-disable */
import _ from "../libs/lodash.min.js";
import store from "../store";
import rights from "./bizroles";
@@ -72,7 +72,7 @@ export default {
var ret = this.defaultRightsObject();
//Get the type name from the type enum value
var typeName = _.findKey(window.$gz.type, function(o) {
var typeName = window.$gz._.findKey(window.$gz.type, function(o) {
return o == oType;
});