mhf-server/Mhf.Server/WebRoutes/AuthLauncherStartRoute.cs
2019-11-24 19:43:35 +08:00

27 lines
843 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 AuthLauncherStartRoute : FileWebRoute
{
public AuthLauncherStartRoute(IFileProvider fileProvider) : base(fileProvider)
{
}
public override string Route => "/auth/launcher/start.html";
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("auth/launcher/start.html");
await response.WriteAsync(startHtml);
return response;
}
}
}