[backend/akko-client] Stub out preview flag to not accidentally spam people
This commit is contained in:
parent
26ec42bc62
commit
410519dafa
2 changed files with 7 additions and 0 deletions
|
@ -45,6 +45,10 @@ public abstract class StatusSchemas
|
|||
|
||||
[B(Name = "poll")] [J("poll")] public PollData? Poll { get; set; }
|
||||
|
||||
[B(Name = "preview")]
|
||||
[J("preview")]
|
||||
public bool Preview { get; set; } = false;
|
||||
|
||||
public class PollData
|
||||
{
|
||||
[B(Name = "options")]
|
||||
|
|
|
@ -330,6 +330,9 @@ public class StatusController(
|
|||
[ProducesErrors(HttpStatusCode.BadRequest, HttpStatusCode.UnprocessableEntity)]
|
||||
public async Task<StatusEntity> PostNote([FromHybrid] StatusSchemas.PostStatusRequest request)
|
||||
{
|
||||
if (request.Preview)
|
||||
throw GracefulException.UnprocessableEntity("Previewing is not supported yet");
|
||||
|
||||
var token = HttpContext.GetOauthToken() ?? throw new Exception("Token must not be null at this stage");
|
||||
var user = token.User;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue