Ready to test in Fab
This commit is contained in:
20
Server/ApiControllers/LastScanController.cs
Normal file
20
Server/ApiControllers/LastScanController.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Barcode.Host.Shared.Models.Stateless;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Barcode.Host.Server.ApiControllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
public class LastScanController : Controller, ILastScanController<IActionResult>
|
||||
{
|
||||
|
||||
private readonly ILastScanService _LastScanService;
|
||||
|
||||
public LastScanController(ILastScanService lastScanService) =>
|
||||
_LastScanService = lastScanService;
|
||||
|
||||
[HttpGet()]
|
||||
public IActionResult GetScan() =>
|
||||
Json(_LastScanService.GetScan(), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
|
||||
}
|
Reference in New Issue
Block a user