Required role: | Admin |
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BlazorDiffusion.ServiceModel;
namespace BlazorDiffusion.ServiceModel
{
[ValidateRequest("IsAdmin")]
public partial class AdminUpdateArtifactCommentReport
: IPatchDb<ArtifactCommentReport>
{
public virtual int Id { get; set; }
public virtual PostReport? PostReport { get; set; }
public virtual string Description { get; set; }
}
public partial class ArtifactCommentReport
{
public virtual long Id { get; set; }
[References(typeof(BlazorDiffusion.ServiceModel.ArtifactComment))]
public virtual int ArtifactCommentId { get; set; }
public virtual int AppUserId { get; set; }
public virtual PostReport PostReport { get; set; }
public virtual string Description { get; set; }
public virtual DateTime CreatedDate { get; set; }
}
public enum PostReport
{
Offensive,
Spam,
Nudity,
Illegal,
Other,
}
}
C# AdminUpdateArtifactCommentReport DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/AdminUpdateArtifactCommentReport HTTP/1.1
Host: blazordiffusion.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"id":0,"postReport":"Offensive","description":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"id":0,"artifactCommentId":0,"appUserId":0,"postReport":"Offensive","description":"String","createdDate":"0001-01-01T00:00:00"}