Skip to content

Commit

Permalink
Add Bluesky Url to Members Profile (DevBetterCom#1177)
Browse files Browse the repository at this point in the history
* Add Bluesky Url to Members Profile

* Update tests

* Add Bluesky Url to UserDetails Page

---------

Co-authored-by: Steve Smith <[email protected]>
  • Loading branch information
Coop56 and ardalis authored Nov 10, 2023
1 parent 84edbda commit 32b381d
Show file tree
Hide file tree
Showing 17 changed files with 1,083 additions and 12 deletions.
7 changes: 5 additions & 2 deletions src/DevBetterWeb.Core/Entities/Member.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ internal Member(string userId, string firstName, string lastName)
public string? TwitchUrl { get; private set; }
public string? YouTubeUrl { get; private set; }
public string? TwitterUrl { get; private set; }
public string? BlueskyUrl { get; private set; }
public string? CodinGameUrl { get; private set; }
public string? DiscordUsername { get; private set; }
public string? MastodonUrl { get; private set; } // added and deployed 5 Jan 2022 but site broke
Expand Down Expand Up @@ -225,27 +226,29 @@ public void UpdatePEInfo(string? peFriendCode, string? peUsername, bool isEvent
}

public void UpdateLinks(string? blogUrl,
string? codinGameUrl,
string? codinGameUrl,
string? gitHubUrl,
string? linkedInUrl,
string? otherUrl,
string? twitchUrl,
string? youtubeUrl,
string? twitterUrl,
string? blueskyUrl,
string? mastodonUrl,
bool isEvent = true)
{
HashSet<(PropertyInfo prop, string? paramValue)> propInfosAndParamValues = new()
{
(GetProperty(nameof(BlogUrl)), blogUrl),
(GetProperty(nameof(BlueskyUrl)), blueskyUrl),
(GetProperty(nameof(CodinGameUrl)), codinGameUrl),
(GetProperty(nameof(GitHubUrl)), gitHubUrl),
(GetProperty(nameof(LinkedInUrl)), linkedInUrl),
(GetProperty(nameof(MastodonUrl)), mastodonUrl),
(GetProperty(nameof(OtherUrl)), otherUrl),
(GetProperty(nameof(TwitchUrl)), twitchUrl),
(GetProperty(nameof(TwitterUrl)), twitterUrl),
(GetProperty(nameof(YouTubeUrl)), youtubeUrl),
(GetProperty(nameof(YouTubeUrl)), youtubeUrl)
};

var valuesChanged = propInfosAndParamValues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public void Configure(EntityTypeBuilder<Member> builder)
builder.Property(x => x.TwitchUrl).HasMaxLength(DataConfigConstants.URL_COLUMN_WIDTH);
builder.Property(x => x.MastodonUrl).HasMaxLength(DataConfigConstants.URL_COLUMN_WIDTH);
builder.Property(x => x.TwitterUrl).HasMaxLength(DataConfigConstants.URL_COLUMN_WIDTH);
builder.Property(x => x.BlueskyUrl).HasMaxLength(DataConfigConstants.URL_COLUMN_WIDTH);
builder.Property(x => x.YouTubeUrl).HasMaxLength(DataConfigConstants.URL_COLUMN_WIDTH);
builder.Property(x => x.FirstName).HasMaxLength(DataConfigConstants.NAME_COLUMN_WIDTH);
builder.Property(x => x.LastName).HasMaxLength(DataConfigConstants.NAME_COLUMN_WIDTH);
Expand Down
Loading

0 comments on commit 32b381d

Please sign in to comment.