20 lines
611 B
C#
20 lines
611 B
C#
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 });
|
|
|
|
} |