Skip to content

Commit

Permalink
bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
peterphanouvong committed May 19, 2022
1 parent 0abfe04 commit b4438ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/handlers/handleAuth.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { login } from "./login";

export default function handler(req, res) {
const { kindeAuth: route } = req.query;
let {
query: { kindeAuth: route },
} = req;

switch (route) {
case "login":
return login(req, res);
default:
res.status(404).end();
}
}
2 changes: 1 addition & 1 deletion src/handlers/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const login = (req, res) => {
console.log("req", req);
console.log("res", res);

res.end("hello");
res.status(200).json({ name: "John Doe" });
};

0 comments on commit b4438ab

Please sign in to comment.