-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patht.js
More file actions
35 lines (29 loc) · 694 Bytes
/
t.js
File metadata and controls
35 lines (29 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
let url = "https://pipeline-mnbv.onrender.com";
async function post(path, body) {
let res = await fetch(`${url}/${path}`, {
method: "post",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
console.log(res.status, await res.json());
}
let email = "prmpsmart@mailinator.com";
let password = "prmpsmart"
async function login() {
await post("auth/login", {
email: email,
password: password,
});
}
async function regiter() {
await post("auth/register", {
full_name: "PRMP Smart",
email: email,
phone_number: "+2348168524477",
password: password,
image: "",
});
}
regiter().then(() => login());