Skip to content

Commit

Permalink
fix replace method
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Jun 12, 2024
1 parent 5c32786 commit d7069de
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export class ContentElementService {
}

async replace(target: AnyContentElementDo, source: AnyContentElementDo): Promise<void> {
await this.delete(target);

const parent = await this.findParentOfId(target.id);
parent.addChild(source);

await this.boardDoRepo.save(parent.children, parent);

await this.delete(target);
}

async move(element: AnyContentElementDo, targetCard: Card, targetPosition: number): Promise<void> {
Expand Down

0 comments on commit d7069de

Please sign in to comment.