Skip to content

Conversation

@vidalhuix
Copy link

@vidalhuix vidalhuix commented May 26, 2024

Netlify link

backend: here
frontend: here

Solo

solo

Copy link
Contributor

@AntonellaMorittu AntonellaMorittu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Arnau, hahah love Pablo Escobar XD did you test your frontend using your auth API? I can't register a user,I'm afraid the logic are swapped: what is the signup page now should be login and viceversa. Please double check the FE app and endpoints are working, thanks :)

Comment on lines 52 to +70
app.get("/", (req, res) => {
res.send("Hello Technigo!");
const endpoints = expressListEndpoints(app);
const documentation = {
Welcome: "This is the Authentication API!",
Endpoints: {
"/": "Get API documentation",
"/users": {
POST: "Create a new user",
},
"/sessions": {
POST: "Authenticate a returning user",
},
"/secrets": {
GET: "Get secret content (requires authentication)",
},
},
};
res.json(documentation);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're not really listing the endpoints urls, try with:

app.get("/", (req, res) => {
  const endpoints = expressListEndpoints(app);
  const documentation = {
    Welcome: "This is the Authentication API!",
    Endpoints: endpoints.map((endpoint) => ({
      method: endpoint.methods.join(", "),
      path: endpoint.path
    }))
  };
  res.json(documentation);
});

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry Antonella, I forgot to tell that I couldn't finish the auth project. I got stuck first on getting the endpoints to work on postman and later trying to deploy to Netlify, so I had no time to connect the FE to the BE. I will try to work on it in another moment. Just now I'm working on the FP.

return (
<div className="button-container">
<button onClick={onClick} type="button">
Sign In
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign in and Login are synonyms, it's sign up or register if you prefer :)

@AntonellaMorittu
Copy link
Contributor

Hello Arnau, don't forget to update this project please 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants