-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial company url code * Cleanup * Update name * Update title * Cleanup * Show title * Update settings page * Add comment * Add company constant * Fix width on tablets
- Loading branch information
1 parent
76db7a7
commit 87ae1a8
Showing
33 changed files
with
1,636 additions
and
759 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
26 changes: 26 additions & 0 deletions
26
src/Application/Users/Queries/GetSocialMedia/GetSocialMediaQuery.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,26 @@ | ||
using SSW.Rewards.Shared.DTOs.Users; | ||
|
||
namespace Microsoft.Extensions.DependencyInjection.Users.Queries.GetSocialMediaId; | ||
|
||
public class GetSocialMediaQuery : IRequest<UserSocialMediaDto> | ||
{ | ||
public int UserId { get; set; } | ||
} | ||
|
||
public class GetSocialMediaQueryHandler(IApplicationDbContext context) : IRequestHandler<GetSocialMediaQuery, UserSocialMediaDto> | ||
{ | ||
public async Task<UserSocialMediaDto> Handle(GetSocialMediaQuery request, CancellationToken cancellationToken) | ||
{ | ||
var socialMedia = await context.UserSocialMediaIds | ||
.Where(x => x.UserId == request.UserId) | ||
.OrderByDescending(x => x.CreatedUtc) | ||
.Select(x => new UserSocialMediaIdDto | ||
{ | ||
SocialMediaUserId = x.SocialMediaUserId, | ||
SocialMediaPlatformId = x.SocialMediaPlatformId | ||
}) | ||
.ToListAsync(cancellationToken: cancellationToken); | ||
|
||
return new UserSocialMediaDto { SocialMedia = socialMedia }; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace SSW.Rewards.Shared.DTOs.Users; | ||
|
||
public class UserSocialMediaDto | ||
{ | ||
public List<UserSocialMediaIdDto> SocialMedia { get; set; } = []; | ||
} |
Oops, something went wrong.