🐛 Fix web finger parsing

This commit is contained in:
2025-12-28 23:45:09 +08:00
parent 2e8a1d05a1
commit ceadb5ad9b
4 changed files with 71 additions and 70 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Text.Json.Serialization;
namespace DysonNetwork.Sphere.ActivityPub;
@@ -68,13 +69,21 @@ public class WebFingerController(
public class WebFingerResponse
{
[JsonPropertyName("subject")]
public string Subject { get; set; } = null!;
[JsonPropertyName("links")]
public List<WebFingerLink> Links { get; set; } = [];
}
public class WebFingerLink
{
[JsonPropertyName("rel")]
public string Rel { get; set; } = null!;
[JsonPropertyName("type")]
public string Type { get; set; } = null!;
[JsonPropertyName("href")]
public string Href { get; set; } = null!;
}