We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 239edfc commit 9aa344cCopy full SHA for 9aa344c
app/api/edit/update.ts
@@ -33,7 +33,7 @@ export const updatePatch = async (
33
if (!patch) {
34
return '该 ID 下未找到对应补丁'
35
}
36
- if (currentUserUid !== patch.user_id || currentUserRole < 2) {
+ if (currentUserUid !== patch.user_id && currentUserRole < 3) {
37
return '您没有权限更新该游戏信息'
38
39
app/api/patch/banner/route.ts
@@ -26,6 +26,12 @@ export const updatePatchBanner = async (
26
if (typeof res === 'string') {
27
return res
28
29
+ const imageLink = `${process.env.KUN_VISUAL_NOVEL_IMAGE_BED_URL}/patch/${patch.id}/banner/banner.avif`
30
+
31
+ await prisma.patch.update({
32
+ where: { id: patch.id },
+ data: { banner: imageLink }
+ })
return {}
0 commit comments