From 8bcf6964ad1460cd3554d75e9e000ade7b450f9f Mon Sep 17 00:00:00 2001 From: LucHeart Date: Sun, 24 Sep 2023 17:39:11 +0200 Subject: [PATCH] Default pic changed --- API/Controller/Device/DeviceSelfController.cs | 2 ++ API/Models/Response/DeviceSelfResponse.cs | 2 ++ API/Utils/GravatarUtils.cs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/API/Controller/Device/DeviceSelfController.cs b/API/Controller/Device/DeviceSelfController.cs index e6104caf..ac8c2771 100644 --- a/API/Controller/Device/DeviceSelfController.cs +++ b/API/Controller/Device/DeviceSelfController.cs @@ -32,6 +32,8 @@ public async Task> GetSelf() { Data = new DeviceSelfResponse { + Id = CurrentDevice.Id, + Name = CurrentDevice.Name, Shockers = shockers } }; diff --git a/API/Models/Response/DeviceSelfResponse.cs b/API/Models/Response/DeviceSelfResponse.cs index 744b4424..4669b88c 100644 --- a/API/Models/Response/DeviceSelfResponse.cs +++ b/API/Models/Response/DeviceSelfResponse.cs @@ -2,5 +2,7 @@ public class DeviceSelfResponse { + public required Guid Id { get; set; } + public required string Name { get; set; } public required IEnumerable Shockers { get; set; } } \ No newline at end of file diff --git a/API/Utils/GravatarUtils.cs b/API/Utils/GravatarUtils.cs index 5268e24e..ce106f2d 100644 --- a/API/Utils/GravatarUtils.cs +++ b/API/Utils/GravatarUtils.cs @@ -9,7 +9,7 @@ public static Uri GetImageUrl(string email) { Span 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"); } } \ No newline at end of file