Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update express endpoints
  • Loading branch information
adam-maj committed Aug 31, 2022
commit 7e016dab30cd4bfcb6e8009a43091251baabcf5c
2 changes: 1 addition & 1 deletion packages/auth/src/express/routes/login.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ThirdwebAuthContext } from "../types";
import { LoginPayload } from "@thirdweb-dev/sdk/dist/src/schema";
import { LoginPayload } from "@thirdweb-dev/sdk";
import { serialize } from "cookie";
import { Request, Response } from "express";

Expand Down
6 changes: 6 additions & 0 deletions packages/auth/src/express/routes/user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Request, Response } from "express";

export default async function handler(req: Request, res: Response) {
if (req.method !== "GET") {
return res.status(400).json({
error: "Invalid method. Only GET supported.",
});
}

return res.status(200).json(req.user);
}