mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
refactor: change jwt claims to lowercase; use response dtos for sensitive data fix: nullify user on token clears; change appsettings.dev View_Internal_API_Key
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using SharpbinV3.Server.DTOs.User;
|
|
|
|
namespace SharpbinV3.Server.DTOs.Paste
|
|
{
|
|
public class PasteResponseDto
|
|
{
|
|
public string ID { get; set; } = string.Empty;
|
|
public Guid UUID { get; set; }
|
|
public string? Title { get; set; }
|
|
public string? Syntax { get; set; }
|
|
public long Size { get; set; }
|
|
public long TrueSize { get; set; }
|
|
public bool IsCompressed { get; set; }
|
|
public int Views { get; set; }
|
|
public int Visibility { get; set; }
|
|
public long? EditedAt { get; set; }
|
|
public long ExpiresAt { get; set; }
|
|
public int? ReportCount { get; set; }
|
|
public UserSimpleDto? Author { get; set; }
|
|
}
|
|
|
|
public class PasteCreatedResponseDto
|
|
{
|
|
public string ID { get; set; } = string.Empty;
|
|
public Guid UUID { get; set; }
|
|
public bool IsCompressed { get; set; }
|
|
public long Size { get; set; }
|
|
public long TrueSize { get; set; }
|
|
public long ExpiresAt { get; set; }
|
|
}
|
|
|
|
public class PasteOptionsDto
|
|
{
|
|
public string[] Syntaxes { get; set; } = [];
|
|
public List<PasteVisibilityOptionDto> Visibilities { get; set; } = [];
|
|
public int MaxTitleLength { get; set; }
|
|
public long MaxPasteSize { get; set; }
|
|
public bool RequiresVerification { get; set; }
|
|
}
|
|
|
|
public class PasteVisibilityOptionDto
|
|
{
|
|
public int Value { get; set; }
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
}
|
|
}
|