fix (build): broken e2e

This commit is contained in:
Mickael Kerjean 2023-04-16 21:08:29 +10:00
parent a5b20bccd6
commit 21e26aea85
2 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,10 @@
import { http_get, http_post, http_delete, currentShare, urlParams } from "../helpers/";
class SessionManager {
constructor() {
this.authorization = null;
}
currentUser() {
const shareID = currentShare();
return http_get("/api/session" + (shareID && `?share=${shareID}`))
@ -38,6 +42,7 @@ class SessionManager {
authenticate(params) {
const url = "/api/session";
this.authorization = null;
return http_post(url, params)
.then((data) => data.result);
}

View file

@ -12,7 +12,7 @@ function ConnectPageComponent({ error, history }) {
const authenticate = (formData) => {
return Session.authenticate(formData)
.then(Session.currentUser)
.then(() => Session.currentUser())
.then((user) => {
if (formData["next"]) {
location = formData["next"];