From 963470b693d6f76a3a07975c528a8f44b98ec64a Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 10 Aug 2025 00:56:48 +0800 Subject: [PATCH] :boom: Change the account profile link format --- DysonNetwork.Pass/Account/Account.cs | 8 +++++++- DysonNetwork.Pass/Account/AccountCurrentController.cs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/DysonNetwork.Pass/Account/Account.cs b/DysonNetwork.Pass/Account/Account.cs index 307c15c..158c1c2 100644 --- a/DysonNetwork.Pass/Account/Account.cs +++ b/DysonNetwork.Pass/Account/Account.cs @@ -125,7 +125,7 @@ public class AccountProfile : ModelBase, IIdentifiedResource [MaxLength(1024)] public string? Pronouns { get; set; } [MaxLength(1024)] public string? TimeZone { get; set; } [MaxLength(1024)] public string? Location { get; set; } - [Column(TypeName = "jsonb")] public Dictionary? Links { get; set; } + [Column(TypeName = "jsonb")] public List? Links { get; set; } public Instant? Birthday { get; set; } public Instant? LastSeenAt { get; set; } @@ -208,6 +208,12 @@ public class AccountProfile : ModelBase, IIdentifiedResource public string ResourceIdentifier => $"account:profile:{Id}"; } +public class ProfileLink +{ + public string Name { get; set; } = string.Empty; + public string Url { get; set; } = string.Empty; +} + public class AccountContact : ModelBase { public Guid Id { get; set; } diff --git a/DysonNetwork.Pass/Account/AccountCurrentController.cs b/DysonNetwork.Pass/Account/AccountCurrentController.cs index 2ea252c..4d62245 100644 --- a/DysonNetwork.Pass/Account/AccountCurrentController.cs +++ b/DysonNetwork.Pass/Account/AccountCurrentController.cs @@ -77,7 +77,7 @@ public class AccountCurrentController( [MaxLength(1024)] public string? Location { get; set; } [MaxLength(4096)] public string? Bio { get; set; } public Instant? Birthday { get; set; } - public Dictionary? Links { get; set; } + public List? Links { get; set; } [MaxLength(32)] public string? PictureId { get; set; } [MaxLength(32)] public string? BackgroundId { get; set; }