Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Add updaterId to ActivityPatch

天舟5a10a27ad0f6
diff --git a/frontend/src/store/modules/activity.ts b/frontend/src/store/modules/activity.ts
index 4788494029..ae1545358f 100644
--- a/frontend/src/store/modules/activity.ts
+++ b/frontend/src/store/modules/activity.ts
@@ -7,6 +7,8 @@ import {
ActivityNew,
ActivityState,
ResourceObject,
+ PrincipalId,
+ ActivityPatch,
} from "../../types";
function convert(activity: ResourceObject, rootGetters: any): Activity {
@@ -94,16 +96,23 @@ const actions = {
{
activityId,
updatedComment,
- }: { activityId: ActivityId; updatedComment: string }
+ updaterId,
+ }: {
+ activityId: ActivityId;
+ updatedComment: string;
+ updaterId: PrincipalId;
+ }
) {
+ const activityPatch: ActivityPatch = {
+ comment: updatedComment,
+ updaterId,
+ };
const updatedActivity = convert(
(
await axios.patch(`/api/activity/${activityId}`, {
data: {
type: "activitypatch",
- attributes: {
- comment: updatedComment,
- },
+ attributes: activityPatch,
},
})
).data.data,
diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.ts
index e3d9d67514..c2779afddc 100644
--- a/frontend/src/types/bytebase.ts
+++ b/frontend/src/types/bytebase.ts
@@ -641,15 +641,16 @@ export type Activity = {
};
export type ActivityNew = {
+ creatorId: PrincipalId;
containerId: ContainerId;
actionType: ActionType;
- creatorId: PrincipalId;
comment: string;
payload?: ActionPayloadType;
};
export type ActivityPatch = {
- payload: any;
+ updaterId: PrincipalId;
+ comment: string;
};
// Message
diff --git a/frontend/src/views/TaskActivityPanel.vue b/frontend/src/views/TaskActivityPanel.vue
index 0c58c691d7..76b9dd4b8c 100644
--- a/frontend/src/views/TaskActivityPanel.vue
+++ b/frontend/src/views/TaskActivityPanel.vue
@@ -460,6 +460,7 @@ export default {
.dispatch("activity/updateComment", {
activityId: state.activeActivity!.id,
updatedComment: editComment.value,
+ updaterId: currentUser.value.id,
})
.then(() => {
cancelEditComment();