1
0
forked from PGL/Clyde
Clyde/frontend/src/rest/Users.js

11 lines
331 B
JavaScript

import { restGet, restPost } from './restConsumer.js'
export async function login(user, pass, 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});
}