mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: update API routes for paste options and recent pastes
This commit is contained in:
@@ -206,7 +206,28 @@ namespace SharpbinV3.Server.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("create/options")]
|
||||
[Route("recent")]
|
||||
public async Task<IActionResult> GetRecentPastes()
|
||||
{
|
||||
var results = await _pasteService.GetList(0, 50, true);
|
||||
return Ok(results.Select(p => new
|
||||
{
|
||||
p.ID,
|
||||
p.UUID,
|
||||
p.Title,
|
||||
p.Size,
|
||||
p.TrueSize,
|
||||
p.IsCompressed,
|
||||
p.Views,
|
||||
p.Syntax,
|
||||
p.Visibility,
|
||||
p.ExpiresAt,
|
||||
p.EditedAt
|
||||
}));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("info")]
|
||||
public IActionResult GetCreatePasteOptions()
|
||||
{
|
||||
var options = new
|
||||
|
||||
Reference in New Issue
Block a user