Skip to content

refactor: standardize endpoints to use TypedResults#1184

Merged
iammukeshm merged 4 commits into
developfrom
refactor/typed-results
Jan 25, 2026
Merged

refactor: standardize endpoints to use TypedResults#1184
iammukeshm merged 4 commits into
developfrom
refactor/typed-results

Conversation

@iammukeshm
Copy link
Copy Markdown
Member

Summary

Converts all Minimal API endpoints from Results.* to TypedResults.* for improved type safety and better OpenAPI documentation.

Changes

  • Updated 17 endpoint files across Identity and Multitenancy modules
  • Changed Results.Ok()TypedResults.Ok()
  • Changed Results.NoContent()TypedResults.NoContent()
  • Changed Results.BadRequest()TypedResults.BadRequest()
  • Changed Results.NotFound()TypedResults.NotFound()
  • Added explicit return types for handlers with multiple return paths (e.g., Results<Ok, NotFound>)
  • Added Microsoft.AspNetCore.Http.HttpResults namespace where needed

Files Modified

Identity Module (12 files)

  • DeleteRoleEndpoint.cs
  • UpdateRolePermissionsEndpoint.cs
  • AdminRevokeSessionEndpoint.cs
  • RevokeSessionEndpoint.cs
  • AssignUserRolesEndpoint.cs
  • ChangePasswordEndpoint.cs
  • ConfirmEmailEndpoint.cs
  • DeleteUserEndpoint.cs
  • ForgotPasswordEndpoint.cs
  • ResetPasswordEndpoint.cs
  • ToggleUserStatusEndpoint.cs
  • UpdateUserEndpoint.cs

Multitenancy Module (5 files)

  • ChangeTenantActivationEndpoint.cs
  • TenantMigrationsEndpoint.cs
  • ResetTenantThemeEndpoint.cs
  • UpdateTenantThemeEndpoint.cs
  • UpgradeTenantEndpoint.cs

Build Verification

✅ Build succeeded with 0 errors, 0 warnings

jarvis and others added 4 commits January 25, 2026 17:34
…dHandler

Fixes #1179

The catch block was swallowing exceptions silently. While the behavior
is intentional (session creation failure shouldn't block login), the
exception should be logged for debugging purposes.

Changes:
- Added ILogger<GenerateTokenCommandHandler> dependency
- Log warning when session creation fails with exception details
- Change navigation property setters from 'private set' to 'init' for EF Core entities (fixes S1144)
  - GroupRole.cs: Group, Role properties
  - PasswordHistory.cs: Id, User properties
  - UserGroup.cs: User, Group properties
  - UserSession.cs: User property
- Add await to InvokeAsync(StateHasChanged) calls in PlaygroundLayout.razor (fixes CS4014)

Build now completes with 0 warnings, 0 errors.
@iammukeshm iammukeshm merged commit 19acf7a into develop Jan 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant