tonitch/front/User_API #56

Merged
tonitch merged 9 commits from tonitch/front/User_API into master 2024-03-07 14:12:50 +01:00
Showing only changes of commit d1b4023d92 - Show all commits

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});
}