// Copyright Epic Games, Inc. All Rights Reserved. using EpicGames.Core; using HordeServer.Api; using HordeServer.Collections; using HordeCommon; using HordeServer.Models; using HordeServer.Services; using HordeServer.Utilities; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Infrastructure; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using MongoDB.Bson; using System; using System.Collections.Generic; using System.IdentityModel.Tokens.Jwt; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Security.Claims; using System.Threading.Tasks; using System.Reflection; using System.Diagnostics; namespace HordeServer.Controllers { /// /// Controller managing account status /// [ApiController] [Authorize] [Route("[controller]")] public class ServerController : ControllerBase { /// /// Constructor /// public ServerController() { } /// /// Force a reset on the database /// [HttpGet] [Route("/api/v1/server/version")] public ActionResult GetVersionAsync() { FileVersionInfo FileVersionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); return Ok(FileVersionInfo.ProductVersion); } } }