-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gender endpoind from Idenitty api.
- Loading branch information
1 parent
79ee950
commit 5c81ec7
Showing
8 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
crs/Services/Identity/Identity.Application/Users/Queries/GetGenders/GetGendersQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace Identity.Application.Users.Queries.GetGenders; | ||
|
||
public sealed record GetGendersQuery() : IQuery<GetGendersQueryResponse>; |
12 changes: 12 additions & 0 deletions
12
...Services/Identity/Identity.Application/Users/Queries/GetGenders/GetGendersQueryHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
namespace Identity.Application.Users.Queries.GetGenders; | ||
|
||
internal sealed class GetRolesQueryHandler : IQueryHandler<GetGendersQuery, GetGendersQueryResponse> | ||
{ | ||
public Task<Result<GetGendersQueryResponse>> Handle(GetGendersQuery request, CancellationToken cancellationToken) | ||
{ | ||
var roles = Gender.GetNames(); | ||
var response = Result.Success(new GetGendersQueryResponse(roles)); | ||
return Task.FromResult(response); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ervices/Identity/Identity.Application/Users/Queries/GetGenders/GetGendersQueryResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace Identity.Application.Users.Queries.GetGenders; | ||
|
||
public sealed record GetGendersQueryResponse(IEnumerable<string> Genders) |
2 changes: 1 addition & 1 deletion
2
crs/Services/Identity/Identity.Application/Users/Queries/GetRoles/GetRolesQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
namespace Identity.Application.Users.Queries.GetRoles; | ||
|
||
public sealed class GetRolesQuery() : IQuery<GetRolesQueryResponse>; | ||
public sealed record GetRolesQuery() : IQuery<GetRolesQueryResponse>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters