mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-26 10:12:59 +01:00
fix (build): broken e2e
This commit is contained in:
parent
a5b20bccd6
commit
21e26aea85
2 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
|
|
|
|||
Loading…
Reference in a new issue