namespace AAIntegration.SimmonsBank.API.Controllers;

using AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using AAIntegration.SimmonsBank.API.Models.Users;
using AAIntegration.SimmonsBank.API.Services;
using AAIntegration.SimmonsBank.API.Config;
using System;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;

[ApiController]
[Route("[controller]")]
public class AppInfoController : ControllerBase
{
    private IVersionService _versionService;

    public AppInfoController(
        IVersionService versionService)
    {
        _versionService = versionService;
    }

    [HttpGet("ApplicationVersion")]
    public IActionResult GetApplicationVersion()
    {
        string appVersion = _versionService.GetVersion();

        return Ok(new { version = appVersion });
    }
}