Skip to content

Commit

Permalink
Changed to api route
Browse files Browse the repository at this point in the history
  • Loading branch information
codingforentrepreneurs committed Jan 27, 2024
1 parent 8509047 commit 640eb24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ app.get("/path", (req, res, next) => {
});


app.get("/leads", async (req, res, next) => {
app.get("/api/leads", async (req, res, next) => {
const results = await crud.listLeads()
return res.status(200).json({
results: results,
});
});

app.post("/leads", async (req, res, next) => {
app.post("/api/leads", async (req, res, next) => {
// POST -> create data
const postData = await req.body
// validation???
Expand Down

0 comments on commit 640eb24

Please sign in to comment.