style: prettier 格式化

This commit is contained in:
erio
2026-03-14 05:10:28 +08:00
parent bd1db1efd8
commit 6dd7583b6c
3 changed files with 5 additions and 17 deletions

View File

@@ -16,7 +16,8 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
}
// 确定最终 groupId如果传了 group_id 用传入值,否则用现有值
const finalGroupId = body.group_id !== undefined ? (body.group_id ? Number(body.group_id) : null) : existing.groupId;
const finalGroupId =
body.group_id !== undefined ? (body.group_id ? Number(body.group_id) : null) : existing.groupId;
// 必须绑定分组才能保存
if (finalGroupId === null || finalGroupId === undefined) {
@@ -44,10 +45,7 @@ export async function PUT(request: NextRequest, { params }: { params: Promise<{
where: { id },
data: { groupId: null, forSale: false },
});
return NextResponse.json(
{ error: '该分组在 Sub2API 中已被删除,已自动解绑,请重新选择分组' },
{ status: 409 },
);
return NextResponse.json({ error: '该分组在 Sub2API 中已被删除,已自动解绑,请重新选择分组' }, { status: 409 });
}
if (body.price !== undefined && (typeof body.price !== 'number' || body.price <= 0 || body.price > 99999999.99)) {