2023-09-01 18:23:53 +02:00
|
|
|
using System.Data;
|
2025-03-03 13:06:53 +01:00
|
|
|
using Google.Cloud.Firestore;
|
2023-09-01 18:23:53 +02:00
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2023-11-29 22:14:37 +01:00
|
|
|
using Microsoft.Data.SqlClient;
|
2023-09-01 18:23:53 +02:00
|
|
|
using WebAPI.Models;
|
|
|
|
|
|
2024-06-18 19:40:16 +02:00
|
|
|
namespace WebAPI.Controllers;
|
|
|
|
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
[Route("api/[controller]")]
|
2025-05-29 10:29:47 +02:00
|
|
|
public class AdminController : Controller {
|
|
|
|
|
|
2024-06-18 19:40:16 +02:00
|
|
|
private readonly IConfiguration _configuration;
|
|
|
|
|
|
|
|
|
|
public AdminController(
|
2025-05-29 10:29:47 +02:00
|
|
|
IConfiguration configuration)
|
2023-09-01 18:23:53 +02:00
|
|
|
{
|
2024-06-18 19:40:16 +02:00
|
|
|
_configuration = configuration;
|
2023-09-01 18:23:53 +02:00
|
|
|
}
|
2025-02-19 11:03:02 +01:00
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("Version")]
|
|
|
|
|
public IActionResult GetVersion() {
|
|
|
|
|
return Ok(new { version = _configuration["app-version"] });
|
|
|
|
|
}
|
2023-09-01 18:23:53 +02:00
|
|
|
}
|