From 34d76fd646f4210f798bd24d95c4f8d106c0075e Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 13 Nov 2025 19:00:38 +0000 Subject: [PATCH] Refactor BookScansController and Iso31661NumericController methods to use synchronous Task return types for improved readability --- Marechai.Server/Controllers/BookScansController.cs | 4 ++-- Marechai.Server/Controllers/Iso31661NumericController.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marechai.Server/Controllers/BookScansController.cs b/Marechai.Server/Controllers/BookScansController.cs index 18034e93..3e3d4740 100644 --- a/Marechai.Server/Controllers/BookScansController.cs +++ b/Marechai.Server/Controllers/BookScansController.cs @@ -45,8 +45,8 @@ public class BookScansController(MarechaiContext context) : ControllerBase [AllowAnonymous] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] - public async Task> GetGuidsByBookAsync(long bookId) => - await context.BookScans.Where(p => p.BookId == bookId).Select(p => p.Id).ToListAsync(); + public Task> GetGuidsByBookAsync(long bookId) => + context.BookScans.Where(p => p.BookId == bookId).Select(p => p.Id).ToListAsync(); [HttpGet] [AllowAnonymous] diff --git a/Marechai.Server/Controllers/Iso31661NumericController.cs b/Marechai.Server/Controllers/Iso31661NumericController.cs index 37c47f56..f59f6150 100644 --- a/Marechai.Server/Controllers/Iso31661NumericController.cs +++ b/Marechai.Server/Controllers/Iso31661NumericController.cs @@ -46,6 +46,6 @@ public class Iso31661NumericController(MarechaiContext context) : ControllerBase [AllowAnonymous] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] - public async Task> GetAsync() => - await context.Iso31661Numeric.OrderBy(c => c.Name).ToListAsync(); + public Task> GetAsync() => + context.Iso31661Numeric.OrderBy(c => c.Name).ToListAsync(); }