mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
* fix: clear button cant clear error msg * new: add setting dialog and add accesscode * fix: address review feedback - dark mode, types, formatting * feat: only show Settings button when access code is required * refactor: rename ACCESS_CODES to ACCESS_CODE_LIST --------- Co-authored-by: dayuan.jiang <jdy.toh@gmail.com>
10 lines
272 B
TypeScript
10 lines
272 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
export async function GET() {
|
|
const accessCodes = process.env.ACCESS_CODE_LIST?.split(',').map(code => code.trim()).filter(Boolean) || [];
|
|
|
|
return NextResponse.json({
|
|
accessCodeRequired: accessCodes.length > 0,
|
|
});
|
|
}
|