From d1b4023d9216d386a9e2d9f8bde148782b75b159 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Tue, 5 Mar 2024 14:58:56 +0100 Subject: [PATCH] adding register --- frontend/src/rest/Users.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/rest/Users.js b/frontend/src/rest/Users.js index 2f414df..b74c9b8 100644 --- a/frontend/src/rest/Users.js +++ b/frontend/src/rest/Users.js @@ -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}); }