#region ========================================================================= USING ===================================================================================== using Lumina.Presentation.Web.Common.Api; using Lumina.Presentation.Web.Common.Models.FileSystemManagement; using Microsoft.AspNetCore.Mvc; using System.Threading; using System.Threading.Tasks; #endregion namespace Lumina.Presentation.Web.Controllers.FileSystemManagement; /// /// Controller for managing file systems. /// [Route("/file-system")] public class FileSystemController : Controller { private readonly IApiHttpClient _apiHttpClient; /// /// Initializes a new instance of the class. /// /// Injected service for interactions with the API. public FileSystemController(IApiHttpClient apiHttpClient) { _apiHttpClient = apiHttpClient; } /// /// Gets the type of the file system. /// /// Cancellation token that can be used to stop the execution. [HttpGet("get-type")] public async Task GetType(CancellationToken cancellationToken) { FileSystemTypeModel response = await _apiHttpClient.GetAsync($"file-system/get-type", cancellationToken: cancellationToken); return Json(new { success = true, data = new { platformType = response.PlatformType.ToString() } }); } }