[backend/masto-client] Fix json-body list endpoint processing
This commit is contained in:
parent
450f754cf9
commit
95b8a61554
1 changed files with 15 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
|||
using B = Microsoft.AspNetCore.Mvc.BindPropertyAttribute;
|
||||
using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;
|
||||
using JR = System.Text.Json.Serialization.JsonRequiredAttribute;
|
||||
|
||||
namespace Iceshrimp.Backend.Controllers.Mastodon.Schemas;
|
||||
|
||||
|
@ -6,13 +8,22 @@ public abstract class ListSchemas
|
|||
{
|
||||
public class ListCreationRequest
|
||||
{
|
||||
[B(Name = "title")] public required string Title { get; set; }
|
||||
[B(Name = "replies_policy")] public string RepliesPolicy { get; set; } = "list";
|
||||
[B(Name = "exclusive")] public bool Exclusive { get; set; } = false;
|
||||
[J("title")] [JR] [B(Name = "title")] public required string Title { get; set; }
|
||||
|
||||
[J("replies_policy")]
|
||||
[B(Name = "replies_policy")]
|
||||
public string RepliesPolicy { get; set; } = "list";
|
||||
|
||||
[J("exclusive")]
|
||||
[B(Name = "exclusive")]
|
||||
public bool Exclusive { get; set; } = false;
|
||||
}
|
||||
|
||||
public class ListUpdateMembersRequest
|
||||
{
|
||||
[B(Name = "account_ids")] public required List<string> AccountIds { get; set; }
|
||||
[J("account_ids")]
|
||||
[JR]
|
||||
[B(Name = "account_ids")]
|
||||
public required List<string> AccountIds { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue