Drop braces on single-line conditionals in BeatService
This commit is contained in:
@@ -183,10 +183,7 @@ public class BeatService(
|
||||
await RequireBeatAccessAsync(beat, ProjectPermission.DeleteContent, ct);
|
||||
|
||||
var chapter = await db.Chapters.FirstOrDefaultAsync(c => c.Id == beat.ChapterId, ct);
|
||||
if (chapter is not null)
|
||||
{
|
||||
chapter.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
}
|
||||
if (chapter is not null) chapter.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
|
||||
db.Beats.Remove(beat);
|
||||
await db.SaveChangesAsync(ct);
|
||||
@@ -225,10 +222,7 @@ public class BeatService(
|
||||
}
|
||||
|
||||
var chapter = await db.Chapters.FirstOrDefaultAsync(c => c.Id == chapterId, ct);
|
||||
if (chapter is not null)
|
||||
{
|
||||
chapter.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
}
|
||||
if (chapter is not null) chapter.UpdatedAt = DateTimeOffset.UtcNow;
|
||||
|
||||
await db.SaveChangesAsync(ct);
|
||||
return await ListAsync(chapterId, ct);
|
||||
|
||||
Reference in New Issue
Block a user