Skip to content

Commit de9b0f9

Browse files
committed
fix: req.urlを使用してURLオブジェクトを作成するよう修正
1 parent 9479e51 commit de9b0f9

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

frontend/auth.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const allowedEmails = process.env.ALLOWED_EMAILS?.split(",") || []; // 環境変
55

66
export const authConfig: NextAuthConfig = {
77
providers: [Google],
8+
trustHost: true, // 型エラーを修正: trustHost を true に設定
89
callbacks: {
910
async signIn({ user }) {
1011
if (allowedEmails.includes(user.email || "")) {

frontend/src/app/api/category/getbycategoryid/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { getCosmosItemsByCategoryId } from "../../../../util/cosmos/document";
99
*/
1010
export const GET = async (req: NextRequest) => {
1111
try {
12-
const url = new URL(req.url); // 修正: URLコンストラクタを使用
12+
const url = new URL(req.url); // 修正: req.urlを使用してURLオブジェクトを作成
1313
const categoryId = url.searchParams.get("categoryId");
1414

1515
if (!categoryId || typeof categoryId !== "string") {

0 commit comments

Comments
 (0)