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);