Commit ae7866c4 authored by cann-alberto's avatar cann-alberto
Browse files

Removing deprecated paths

parent 6b5027c4
...@@ -7,31 +7,13 @@ namespace MMM_Server.Controllers; ...@@ -7,31 +7,13 @@ namespace MMM_Server.Controllers;
[ApiController] [ApiController]
[Route("api/[controller]")] [Route("api/[controller]")]
public class ActivityController: ControllerBase public class ActivityController: ControllerBase
{ {
private readonly UserService _usersService;
private readonly ActionRequestService _actionsService;
public ActivityController(UserService usersService, ActionRequestService actionService) public ActivityController()
{ {
_usersService = usersService;
_actionsService = actionService;
}
[HttpGet("users")]
public async Task<List<User>> Get() =>
await _usersService.GetAsync();
[HttpGet("logins")]
public async Task<List<ActionRequest>> GetActions() =>
await _actionsService.GetAsync();
[HttpPost("logins")]
public async Task<IActionResult> Post(ActionRequest newAction)
{
await _actionsService.CreateAsync(newAction);
return CreatedAtAction(nameof(Get), new { id = newAction.ActionRequestID }, newAction);
} }
} }
......
...@@ -15,9 +15,9 @@ public class AuthorController : ControllerBase ...@@ -15,9 +15,9 @@ public class AuthorController : ControllerBase
_usersService = usersService; _usersService = usersService;
} }
[HttpGet("users")] //[HttpGet("users")]
public async Task<List<User>> Get() => //public async Task<List<User>> Get() =>
await _usersService.GetAsync(); // await _usersService.GetAsync();
} }
......
...@@ -51,21 +51,21 @@ public class RegistrationController : ControllerBase ...@@ -51,21 +51,21 @@ public class RegistrationController : ControllerBase
return CreatedAtAction(nameof(Get), new { id = newUser.Id }, newUser); return CreatedAtAction(nameof(Get), new { id = newUser.Id }, newUser);
} }
[HttpPost("personae")] //[HttpPost("personae")]
public async Task<IActionResult> Post(Persona newPersona) //public async Task<IActionResult> Post(Persona newPersona)
{ //{
await _personaeService.CreateAsync(newPersona); // await _personaeService.CreateAsync(newPersona);
return CreatedAtAction(nameof(Get), new { id = newPersona.PersonaID }, newPersona); // return CreatedAtAction(nameof(Get), new { id = newPersona.PersonaID }, newPersona);
} //}
[HttpPost("devices")] //[HttpPost("devices")]
public async Task<IActionResult> Post(Device newDevice) //public async Task<IActionResult> Post(Device newDevice)
{ //{
await _devicesService.CreateAsync(newDevice); // await _devicesService.CreateAsync(newDevice);
return CreatedAtAction(nameof(Get), new { id = newDevice.Id }, newDevice); // return CreatedAtAction(nameof(Get), new { id = newDevice.Id }, newDevice);
} //}
[HttpGet("accounts/{humanId}")] [HttpGet("accounts/{humanId}")]
public async Task<IActionResult> GetAccountByHumanId(string humanId) public async Task<IActionResult> GetAccountByHumanId(string humanId)
......
...@@ -14,7 +14,7 @@ using System.Reflection; ...@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("MMM-Server")] [assembly: System.Reflection.AssemblyCompanyAttribute("MMM-Server")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+82275fe181a98f6d377b0ccd626361ff200555de")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6b5027c433ea6937ea9687f88fe2b87e947c15ff")]
[assembly: System.Reflection.AssemblyProductAttribute("MMM-Server")] [assembly: System.Reflection.AssemblyProductAttribute("MMM-Server")]
[assembly: System.Reflection.AssemblyTitleAttribute("MMM-Server")] [assembly: System.Reflection.AssemblyTitleAttribute("MMM-Server")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
......
14bb1a95e7c65a51193874943c2d22416a9177536fc77b166cf1d7724b3959e2 77938c610c9a74820497c30fa374e57a27ed464723429730aeb5fb34c769dcb7
{"documents":{"C:\\Users\\lab2a\\Documents\\Visual Studio 2022\\Projects\\MPAI-MMM\\MMM-Server\\*":"https://raw.githubusercontent.com/cann-alberto/MPAI-MMM/82275fe181a98f6d377b0ccd626361ff200555de/*"}} {"documents":{"C:\\Users\\lab2a\\Documents\\Visual Studio 2022\\Projects\\MPAI-MMM\\MMM-Server\\*":"https://raw.githubusercontent.com/cann-alberto/MPAI-MMM/6b5027c433ea6937ea9687f88fe2b87e947c15ff/*"}}
\ No newline at end of file \ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment