Skip to content

Commit 48c0223

Browse files
committed
feat: allow user to use search apis
1 parent 9420de6 commit 48c0223

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

middleware.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ export async function middleware(request: NextRequest) {
1313
return NextResponse.next()
1414
}
1515

16+
if (
17+
method === 'POST' &&
18+
(pathname === '/api/search' ||
19+
pathname === '/api/company/search' ||
20+
pathname === '/api/tag/search')
21+
) {
22+
return NextResponse.next()
23+
}
24+
1625
const msg =
17-
'网站目前正在数据同步中, 约 2025 年 11 月 11 日晚 11 点完成同步(一天后),请一天后再来操作'
26+
'网站目前正在数据同步中, 约 2025 年 11 月 12 日晚 11 点完成同步(两天后),请两天后再来操作'
1827
return NextResponse.json(msg)
1928
}
2029

0 commit comments

Comments
 (0)