mirror of
https://github.com/sebastian-heinz/mhf-server.git
synced 2025-04-05 23:38:36 +08:00
27 lines
815 B
C#
27 lines
815 B
C#
using System.Threading.Tasks;
|
|
using Mhf.Server.Web;
|
|
using Mhf.Server.Web.Route;
|
|
using Microsoft.Extensions.FileProviders;
|
|
|
|
namespace Mhf.Server.WebRoutes
|
|
{
|
|
public class LauncherIndexRoute : FileWebRoute
|
|
{
|
|
public LauncherIndexRoute(IFileProvider fileProvider) : base(fileProvider)
|
|
{
|
|
}
|
|
|
|
public override string Route => "/launcher/";
|
|
|
|
public override async Task<WebResponse> Get(WebRequest request)
|
|
{
|
|
WebResponse response = new WebResponse();
|
|
response.StatusCode = 200;
|
|
response.Header.Add("content-type", "text/html; charset=UTF-8");
|
|
IFileInfo startHtml = FileProvider.GetFileInfo("launcher/index.html");
|
|
await response.WriteAsync(startHtml);
|
|
return response;
|
|
}
|
|
}
|
|
}
|