fix(board): use plain number refs in event payloads
OGraph Engine expects ref fields (subject, assignee) as plain numbers,
not {ref: N} objects. The old format caused 500 errors on event emit.
This commit is contained in:
parent
8702e8b1c3
commit
edeb549162
@ -132,7 +132,7 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_created",
|
||||
payload: {
|
||||
subject: { ref: obj.id },
|
||||
subject: obj.id,
|
||||
title: data.title,
|
||||
priority: data.priority ?? "p2",
|
||||
...(data.description ? { description: data.description } : {}),
|
||||
@ -147,8 +147,8 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_assigned",
|
||||
payload: {
|
||||
subject: { ref: obj.id },
|
||||
assignee: { ref: data.assigneeId },
|
||||
subject: obj.id,
|
||||
assignee: data.assigneeId,
|
||||
},
|
||||
}),
|
||||
})
|
||||
@ -162,7 +162,7 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_status_changed",
|
||||
payload: {
|
||||
subject: { ref: obj.id },
|
||||
subject: obj.id,
|
||||
status,
|
||||
},
|
||||
}),
|
||||
@ -194,7 +194,7 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_status_changed",
|
||||
payload: {
|
||||
subject: { ref: id },
|
||||
subject: id,
|
||||
status: data.status,
|
||||
},
|
||||
}),
|
||||
@ -209,8 +209,8 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_assigned",
|
||||
payload: {
|
||||
subject: { ref: id },
|
||||
assignee: data.assigneeId ? { ref: data.assigneeId } : null,
|
||||
subject: id,
|
||||
assignee: data.assigneeId ?? null,
|
||||
},
|
||||
}),
|
||||
})
|
||||
@ -241,7 +241,7 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_status_changed",
|
||||
payload: {
|
||||
subject: { ref: _id },
|
||||
subject: _id,
|
||||
status: "done",
|
||||
},
|
||||
}),
|
||||
@ -254,7 +254,7 @@ export class OGraphClient implements TaskAPI {
|
||||
body: JSON.stringify({
|
||||
type: "task_status_changed",
|
||||
payload: {
|
||||
subject: { ref: id },
|
||||
subject: id,
|
||||
status,
|
||||
},
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user