diff --git a/Controllers/Field2Controller.cs b/Controllers/Field2Controller.cs deleted file mode 100644 index 4da2c20..0000000 --- a/Controllers/Field2Controller.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace WebApplication1.Controllers -{ - [Route("api/v2/[controller]")] - [ApiController] - public class Field2Controller : ControllerBase - { - private IFieldManager _fm; - private ILogger _lg; - - /// - /// .ctor - /// - /// - public Field2Controller( - IFieldManager fm, - ILogger lg) - { - _fm = fm; - _lg = lg; - } - - - - [HttpPost(Name = "new")] - [Route("new")] - public Field StartNewGame() - { - return _fm.StartNewGame(); - } - [HttpPost(Name = "move")] - [Route("move")] - public Field Move(string identifier) - { - return _fm.Move(identifier); - } - - [HttpPost(Name = "move2")] - [Route("move2")] - public Field Move2(string identifier) - { - return _fm.Move(identifier); - } - - [HttpGet(Name = "list")] - [Route("list")] - public Field List(string identifier) - { - return _fm.List(identifier); - } - - } -} diff --git a/Controllers/FieldController.cs b/Controllers/FieldController.cs index 5f162c5..c9e329a 100644 --- a/Controllers/FieldController.cs +++ b/Controllers/FieldController.cs @@ -29,21 +29,18 @@ namespace WebApplication1.Controllers - [HttpPost(Name = "new")] - [Route("new")] + [HttpPost("new")] public Field StartNewGame() { return _fm.StartNewGame(); } - [HttpPost(Name = "move")] - [Route("move")] + [HttpPost("move")] public Field Move(string identifier) { return _fm.Move(identifier); } - [HttpGet(Name = "list")] - [Route("list")] + [HttpGet("list")] public Field List(string identifier) { return _fm.List(identifier); diff --git a/TextFile.md b/TextFile.md index ecc2326..2c7ba93 100644 --- a/TextFile.md +++ b/TextFile.md @@ -8,4 +8,5 @@ - Получить класс через Dependency Injection (конструктор) - Использовать класс для выдачи результата +-- https://git.v5a.ru/pi23/practice -- SET PATH=%PATH%;"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin" \ No newline at end of file