Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 9f11252

Browse files
authored
Merge pull request #12 from magiclabs/develop
call save-user-info instead of login
2 parents 8d1767a + 3ad0165 commit 9f11252

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pages/login.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const Login = () => {
5050
Second step happens at the server side; where you call your
5151
application logic to save the user's info in some kind of database.
5252
*/
53-
const resFromGoServer = await fetch("https://scrappy-secure-go-twitter-api.wl.r.appspot.com/login", {
53+
const resFromGoServer = await fetch("https://scrappy-secure-go-twitter-api.wl.r.appspot.com/save-user-info", {
5454
method: "POST",
5555
headers: {
5656
"Content-Type": "application/json",
@@ -61,7 +61,7 @@ const Login = () => {
6161

6262
if (resFromGoServer.status === 200) {
6363
console.log(
64-
"YAY, we were able to make a request to the Go server /login endpoint: ",
64+
"YAY, we were able to make a request to the Go server /save-user-info endpoint: ",
6565
resFromGoServer
6666
);
6767

@@ -72,7 +72,7 @@ const Login = () => {
7272
Router.push("/");
7373
} else {
7474
throw new Error(
75-
`Oh no, we ran into an error while calling the server's login endpoint: `,
75+
`Oh no, we ran into an error while calling the server's /save-user-info endpoint: `,
7676
await resFromGoServer.text()
7777
);
7878
}

0 commit comments

Comments
 (0)