Update to NetCore 3.1, added Kestrel for REST api and few basic endpoints.

This commit is contained in:
Karolis2011
2020-01-04 14:42:57 +02:00
parent 402d1943c1
commit 0e06afd5e6
8 changed files with 171 additions and 53 deletions

View File

@@ -0,0 +1,31 @@
using ASS.Server.Services;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace ASS.Server.Web.Controllers
{
[ApiController]
[Route("[controller]")]
public class ByondController : ControllerBase
{
ByondService byondService;
public ByondController(ByondService bs)
{
byondService = bs;
}
[HttpPost("install/{major}.{minor}")]
public async Task<int> InstallVersionAsync(int major, int minor)
{
await byondService.SwitchToVersion(new API.ByondVersion() { Major = major, Minor = minor });
return 0;
}
}
}