Skip to content

Commit 89dadb9

Browse files
committed
More changes
1 parent 1d1ee8c commit 89dadb9

35 files changed

+41
-19
lines changed

API/Controller/Account/Activate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public sealed partial class AccountController
1616
[ProducesResponseType(StatusCodes.Status200OK)]
1717
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status400BadRequest, MediaTypeNames.Application.ProblemJson)]
1818
[MapToApiVersion("1")]
19+
[EndpointGroupName("v1")]
1920
public async Task<IActionResult> Activate([FromQuery(Name = "token")] string token, CancellationToken cancellationToken)
2021
{
2122
bool ok = await _accountService.TryActivateAccountAsync(token, cancellationToken);

API/Controller/Account/CheckUsername.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public sealed partial class AccountController
1515
/// <param name="cancellationToken"></param>
1616
/// <returns></returns>
1717
[HttpPost("username/check")] // High-volume endpoint, we don't want to rate limit this
18+
[EndpointGroupName("v1")]
1819
[Consumes(MediaTypeNames.Application.Json)]
1920
public async Task<UsernameCheckResponse> CheckUsername([FromBody] ChangeUsernameRequest body, CancellationToken cancellationToken)
2021
{

API/Controller/Account/Login.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public sealed partial class AccountController
2323
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status401Unauthorized, MediaTypeNames.Application.ProblemJson)] // InvalidCredentials
2424
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status403Forbidden, MediaTypeNames.Application.ProblemJson)] // InvalidDomain
2525
[MapToApiVersion("1")]
26+
[EndpointGroupName("v1")]
2627
public async Task<IActionResult> Login(
2728
[FromBody] Login body,
2829
CancellationToken cancellationToken)

API/Controller/Account/LoginV2.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public sealed partial class AccountController
2727
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status401Unauthorized, MediaTypeNames.Application.ProblemJson)] // InvalidCredentials
2828
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status403Forbidden, MediaTypeNames.Application.ProblemJson)] // InvalidDomain
2929
[MapToApiVersion("2")]
30+
[EndpointGroupName("v2")]
3031
public async Task<IActionResult> LoginV2(
3132
[FromBody] LoginV2 body,
3233
[FromServices] ICloudflareTurnstileService turnstileService,

API/Controller/Account/Logout.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public sealed partial class AccountController
1010
[HttpPost("logout")]
1111
[ProducesResponseType(StatusCodes.Status200OK)]
1212
[MapToApiVersion("1")]
13+
[EndpointGroupName("v1")]
1314
public async Task<IActionResult> Logout([FromServices] ISessionService sessionService)
1415
{
1516
// Remove session if valid

API/Controller/Account/PasswordResetCheckValid.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public sealed partial class AccountController
2323
[ProducesResponseType<LegacyEmptyResponse>(StatusCodes.Status200OK, MediaTypeNames.Application.Json)]
2424
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status404NotFound, MediaTypeNames.Application.ProblemJson)] // PasswordResetNotFound
2525
[MapToApiVersion("1")]
26+
[EndpointGroupName("v1")]
2627
public async Task<IActionResult> PasswordResetCheckValid([FromRoute] Guid passwordResetId, [FromRoute] string secret, CancellationToken cancellationToken)
2728
{
2829
var passwordResetExists = await _accountService.CheckPasswordResetExistsAsync(passwordResetId, secret, cancellationToken);

API/Controller/Account/PasswordResetComplete.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public sealed partial class AccountController
2424
[ProducesResponseType<LegacyEmptyResponse>(StatusCodes.Status200OK, MediaTypeNames.Application.Json)]
2525
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status404NotFound, MediaTypeNames.Application.ProblemJson)] // PasswordResetNotFound
2626
[MapToApiVersion("1")]
27+
[EndpointGroupName("v1")]
2728
public async Task<IActionResult> PasswordResetComplete([FromRoute] Guid passwordResetId,
2829
[FromRoute] string secret, [FromBody] PasswordResetProcessData body)
2930
{

API/Controller/Account/PasswordResetInitiate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public sealed partial class AccountController
1717
[EnableRateLimiting("auth")]
1818
[Consumes(MediaTypeNames.Application.Json)]
1919
[MapToApiVersion("1")]
20+
[EndpointGroupName("v1")]
2021
[ProducesResponseType<LegacyEmptyResponse>(StatusCodes.Status200OK, MediaTypeNames.Application.Json)]
2122
public async Task<IActionResult> PasswordResetInitiate([FromBody] ResetRequest body)
2223
{

API/Controller/Account/PasswordResetInitiateV2.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public sealed partial class AccountController
2323
[ProducesResponseType(StatusCodes.Status200OK)]
2424
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status403Forbidden, MediaTypeNames.Application.ProblemJson)]
2525
[MapToApiVersion("2")]
26+
[EndpointGroupName("v1")]
2627
public async Task<IActionResult> PasswordResetInitiateV2([FromBody] PasswordResetRequestV2 body, [FromServices] ICloudflareTurnstileService turnstileService, CancellationToken cancellationToken)
2728
{
2829
var turnStile = await turnstileService.VerifyUserResponseTokenAsync(body.TurnstileResponse, HttpContext.GetRemoteIP(), cancellationToken);

API/Controller/Account/Signup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public sealed partial class AccountController
2323
[ProducesResponseType<LegacyEmptyResponse>(StatusCodes.Status200OK, MediaTypeNames.Application.Json)]
2424
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status409Conflict, MediaTypeNames.Application.ProblemJson)] // EmailOrUsernameAlreadyExists
2525
[MapToApiVersion("1")]
26+
[EndpointGroupName("v1")]
2627
public async Task<IActionResult> SignUp([FromBody] SignUp body)
2728
{
2829
var creationAction = await _accountService.CreateAccountWithoutActivationFlowLegacyAsync(body.Email, body.Username, body.Password);

0 commit comments

Comments
 (0)