1
0
forked from PGL/Clyde

adding register

This commit is contained in:
Debucquoy Anthony 2024-03-05 14:58:56 +01:00
parent 837db9aba9
commit d1b4023d92
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -1,5 +1,10 @@
import { restGet, restPost } from './restConsumer.js'
export async function login(user, pass, exp){
restPost("/login", {login: user, password: pass, expiration: exp})
return restPost("/login", {login: user, password: pass, expiration: exp});
//TODO: set token in cookies
}
export async function register(user, pass, mail){
return restPost("/user", {name: user, password: pass, mail: mail});
}