From 8fafe74fa3dda018c8c870f682fc28ecabbd6ab5 Mon Sep 17 00:00:00 2001 From: xion Date: Wed, 2 Apr 2025 09:55:15 +0800 Subject: [PATCH] fix: fix bugs --- src/routes/mark/list.ts | 7 ++++--- submodules/code-center-module | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/routes/mark/list.ts b/src/routes/mark/list.ts index 864e6b6..ba8a2e1 100644 --- a/src/routes/mark/list.ts +++ b/src/routes/mark/list.ts @@ -120,7 +120,7 @@ app }) .define(async (ctx) => { const tokenUser = ctx.state.tokenUser; - const { id, createdAt, updatedAt, uid: _, puid: _2, uname: _3, ...data } = ctx.query.data || {}; + const { id, createdAt, updatedAt, uid: _, puid: _2, uname: _3, data, ...rest } = ctx.query.data || {}; let markModel: MarkModel; if (id) { markModel = await MarkModel.findByPk(id); @@ -133,7 +133,7 @@ app const version = Number(markModel.version) + 1; await markModel.update({ ...markModel.data, - ...data, + ...rest, data: { ...markModel.data, ...data, @@ -142,7 +142,8 @@ app }); } else { markModel = await MarkModel.create({ - ...data, + data, + ...rest, uname: tokenUser.username, uid: tokenUser.id, puid: tokenUser.uid, diff --git a/submodules/code-center-module b/submodules/code-center-module index 162d4c7..0a72db7 160000 --- a/submodules/code-center-module +++ b/submodules/code-center-module @@ -1 +1 @@ -Subproject commit 162d4c72b409530c6789ea8b3efcc7963715bed8 +Subproject commit 0a72db77719e8f99a4027566bc86217c85c1bab3