aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index baf2176d..65d42ffb 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -98,6 +98,7 @@ export const info = (m) => {
export const login = async (user, cookies) => {
let maxAge = 30 * 24 * 60 * 60;
let { token } = await post('/login', user);
+ if (!token) throw new Error("Login failed");
let expires = new Date();
expires.setSeconds(expires.getSeconds() + maxAge);