Skip to content

Commit ec9748e

Browse files
committed
fix: update LiveItemService to correctly map live_item_status to live_item_status_id in update method
1 parent 89646a2 commit ec9748e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/services/liveItem/liveItem.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ export class LiveItemService extends BaseOneService<LiveItem, 'item'> {
1717
}
1818

1919
async update(item: Item, dto: LiveItemDto): Promise<LiveItem> {
20-
return super._update(item, dto, { relations: ['live_item_status'] });
20+
const finalDto = {
21+
...dto,
22+
live_item_status_id: dto.live_item_status
23+
};
24+
return super._update(item, finalDto, { relations: ['live_item_status'] });
2125
}
2226

2327
async getManyByChannel(channel: Channel, config?: FindManyOptions<LiveItem>): Promise<LiveItem[]> {

0 commit comments

Comments
 (0)