Frontend
This commit is contained in:
parent
0b2caf822d
commit
05bc9c9f82
@ -1,15 +0,0 @@
|
|||||||
const BASE_URL = "http://localhost:3000/api";
|
|
||||||
|
|
||||||
export async function registerRequest(username, password) {
|
|
||||||
try {
|
|
||||||
const response = await fetch(`${BASE_URL}/register`, {
|
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ username, password })
|
|
||||||
});
|
|
||||||
return await response.json();
|
|
||||||
} catch (err) {
|
|
||||||
console.error("API register error:", err);
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
0
Modal Register.js
Normal file
0
Modal Register.js
Normal file
Loading…
x
Reference in New Issue
Block a user