aboutsummaryrefslogtreecommitdiff
path: root/static/api/auth.js
blob: e663d88fef4de032761963fcafa17dcc89368903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import * as rest from './rest.js';


export async function login(user, password) {
	const response = await rest.post('/api/auth/login', { user, password });
	return response?.success ?? false;
}

export async function is_first_login(user) {
	const response = await rest.post('/api/auth/first-login', { user });
	return response?.is_first ?? false;
}