Skip to content

Commit

Permalink
chore: fix formatting & delete redundant empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
HunorTotBagi committed Jan 13, 2025
1 parent e4ca881 commit 4b75aa6
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public async Task<DeleteFileAssetResult> Handle(DeleteFileAssetCommand command,
if (fileAsset is null)
throw new FileAssetNotFoundException(command.FileAssetId);


dbContext.FileAssets.Remove(fileAsset);
await dbContext.SaveChangesAsync(cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public async Task<DeleteNodeResult> Handle(DeleteNodeCommand command, Cancellati
if (node is null)
throw new NodeNotFoundException(command.NodeId);


dbContext.Nodes.Remove(node);
await dbContext.SaveChangesAsync(cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public async Task<DeleteNoteResult> Handle(DeleteNoteCommand command, Cancellati
if (note is null)
throw new NoteNotFoundException(command.NoteId);


dbContext.Notes.Remove(note);
await dbContext.SaveChangesAsync(cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public async Task<DeleteReminderResult> Handle(DeleteReminderCommand command, Ca
if (reminder is null)
throw new ReminderNotFoundException(command.ReminderId);


dbContext.Reminders.Remove(reminder);
await dbContext.SaveChangesAsync(cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ public class DeleteNodeHandler(ITimelinesDbContext dbContext) : ICommandHandler<
public async Task<DeleteTimelineResult> Handle(DeleteTimelineCommand command, CancellationToken cancellationToken)
{
var timeline = await dbContext.Timelines
.AsNoTracking()
.AsNoTracking()
.SingleOrDefaultAsync(t => t.Id == TimelineId.Of(Guid.Parse(command.TimelineId)), cancellationToken);

if (timeline is null)
throw new TimelineNotFoundException(command.TimelineId);


dbContext.Timelines.Remove(timeline);
await dbContext.SaveChangesAsync(cancellationToken);

Expand Down

0 comments on commit 4b75aa6

Please sign in to comment.