Skip to content

Commit

Permalink
Delete openlayers, init very basic leaflet
Browse files Browse the repository at this point in the history
  • Loading branch information
Jantero93 committed Jun 8, 2024
1 parent 88cac57 commit 191b47b
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 326 deletions.
11 changes: 3 additions & 8 deletions MapServer/Controllers/AuthenticationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
namespace MapServer.Controllers;

[ApiController]
[Route("api/[controller]")]
[ProducesErrorResponseType(typeof(RequestFailedResponse))]
[Produces(MediaTypeNames.Application.Json)]
[Route("api/[controller]")]
public class AuthenticationController(
UserManager<ApplicationUser> userManager,
IOpenIddictTokenManager tokenManager,
Expand All @@ -26,8 +27,6 @@ ILogger<AuthenticationController> logger
[HttpPost("~/connect/token")]
[AllowAnonymous]
[Consumes(MediaTypeNames.Application.FormUrlEncoded)]
[Produces(MediaTypeNames.Application.Json)]
[ProducesDefaultResponseType(typeof(OpenIddictLoginResponse))]
public async Task<IActionResult> Login()
{
logger.LogInformation("OpenIddict Login endpoint");
Expand Down Expand Up @@ -81,7 +80,6 @@ public async Task<IActionResult> Login()

[HttpPost("register")]
[AllowAnonymous]
[Produces(MediaTypeNames.Application.Json)]
public async Task<IActionResult> Login([FromBody] RegisterRequest req)
{
var userExists = await userManager.FindByNameAsync(req.Username);
Expand Down Expand Up @@ -115,10 +113,7 @@ public async Task<IActionResult> Logout()

if (string.IsNullOrEmpty(userId))
{
return StatusCode(StatusCodes.Status500InternalServerError, new RequestFailedResponse
{
Message = "Logout failed"
});
return NoContent();
}

var tokens = await tokenManager.FindBySubjectAsync(userId).ToListAsync();
Expand Down
1 change: 1 addition & 0 deletions MapServer/Controllers/SecurityBaseApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace MapServer.Controllers;
[Authorize]
[Produces(MediaTypeNames.Application.Json)]
[ProducesErrorResponseType(typeof(RequestFailedResponse))]
[ProducesResponseType(StatusCodes.Status200OK)]
public abstract class SecurityBaseApiController : ControllerBase
{
}
Loading

1 comment on commit 191b47b

@Jantero93
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.