Skip to content

Commit

Permalink
Default pic changed
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Sep 24, 2023
1 parent a1f22b9 commit 8bcf696
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions API/Controller/Device/DeviceSelfController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public async Task<BaseResponse<DeviceSelfResponse>> GetSelf()
{
Data = new DeviceSelfResponse
{
Id = CurrentDevice.Id,
Name = CurrentDevice.Name,
Shockers = shockers
}
};
Expand Down
2 changes: 2 additions & 0 deletions API/Models/Response/DeviceSelfResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

public class DeviceSelfResponse
{
public required Guid Id { get; set; }
public required string Name { get; set; }
public required IEnumerable<MinimalShocker> Shockers { get; set; }
}
2 changes: 1 addition & 1 deletion API/Utils/GravatarUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static Uri GetImageUrl(string email)
{
Span<byte> tempSpan = stackalloc byte[32];
SHA256.HashData(Encoding.UTF8.GetBytes(email), tempSpan);
return new Uri($"https://www.gravatar.com/avatar/{Convert.ToHexString(tempSpan).ToLowerInvariant()}?d=https%3A%2F%2Fstatic.wikia.nocookie.net%2Frickandmorty%2Fimages%2Fe%2Fee%2FMorty501.png");
return new Uri($"https://www.gravatar.com/avatar/{Convert.ToHexString(tempSpan).ToLowerInvariant()}?d=https%3A%2F%2Fshocklink.b-cdn.net%2Fweb%2Fshocklink-logo-only.png");
}

}

0 comments on commit 8bcf696

Please sign in to comment.