Skip to content

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

Only pass creatorId instead of id and name to the new activity request.

天舟104006c3ded5
diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.ts
index a5c56cb8e4..2ddff69156 100644
--- a/frontend/src/types/bytebase.ts
+++ b/frontend/src/types/bytebase.ts
@@ -497,7 +497,14 @@ export type Activity = {
comment: string;
payload?: ActionPayloadType;
};
-export type ActivityNew = Omit<Activity, "id">;
+
+export type ActivityNew = {
+ containerId: ContainerId;
+ actionType: ActionType;
+ creatorId: PrincipalId;
+ comment: string;
+ payload?: ActionPayloadType;
+};
export type ActivityPatch = {
payload: any;
diff --git a/frontend/src/views/TaskActivityPanel.vue b/frontend/src/views/TaskActivityPanel.vue
index 899a74f3a5..7f40f77e9e 100644
--- a/frontend/src/views/TaskActivityPanel.vue
+++ b/frontend/src/views/TaskActivityPanel.vue
@@ -407,10 +407,7 @@ export default {
.dispatch("activity/createActivity", {
actionType: "bytebase.task.comment.create",
containerId: props.task.id,
- creator: {
- id: currentUser.value.id,
- name: currentUser.value.name,
- },
+ creatorId: currentUser.value.id,
comment: newComment.value,
})
.then(() => {