promise wrangling
This commit is contained in:
@@ -7,6 +7,13 @@ export const getAllUsers = async () => {
|
||||
return serverCall;
|
||||
}
|
||||
|
||||
export const getOneUser = async (email: string) => {
|
||||
let serverCall = await fetch(`http://localhost:8088/users?email=${email}`)
|
||||
.then(res => res.json());
|
||||
|
||||
return serverCall;
|
||||
}
|
||||
|
||||
export const registerNewUser = async (user: userInfo) => {
|
||||
let serverCall = await fetch('http://localhost:8088/register', {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user