fix bangumi

This commit is contained in:
shinya
2025-09-25 00:54:27 +08:00
parent 586ab2a058
commit c65ce8c55d
9 changed files with 41 additions and 15 deletions

View File

@@ -25,7 +25,7 @@ export async function GET(request: NextRequest) {
}
const config = await getConfig();
if (authInfo.username !== process.env.ADMIN_USERNAME) {
if (authInfo.username !== process.env.USERNAME) {
// 非站长,检查用户存在或被封禁
const user = config.UserConfig.Users.find(
(u) => u.username === authInfo.username
@@ -79,7 +79,7 @@ export async function POST(request: NextRequest) {
}
const config = await getConfig();
if (authInfo.username !== process.env.ADMIN_USERNAME) {
if (authInfo.username !== process.env.USERNAME) {
// 非站长,检查用户存在或被封禁
const user = config.UserConfig.Users.find(
(u) => u.username === authInfo.username
@@ -150,7 +150,7 @@ export async function DELETE(request: NextRequest) {
}
const config = await getConfig();
if (authInfo.username !== process.env.ADMIN_USERNAME) {
if (authInfo.username !== process.env.USERNAME) {
// 非站长,检查用户存在或被封禁
const user = config.UserConfig.Users.find(
(u) => u.username === authInfo.username