diff --git a/Notesnook.API/Controllers/MonographsController.cs b/Notesnook.API/Controllers/MonographsController.cs
index 024b4f7..d37e68e 100644
--- a/Notesnook.API/Controllers/MonographsController.cs
+++ b/Notesnook.API/Controllers/MonographsController.cs
@@ -36,6 +36,7 @@ namespace Notesnook.API.Controllers
[Authorize("Sync")]
public class MonographsController : ControllerBase
{
+ const string SVG_PIXEL = "";
private Repository Monographs { get; set; }
private readonly IUnitOfWork unit;
private const int MAX_DOC_SIZE = 15 * 1024 * 1024;
@@ -127,24 +128,17 @@ namespace Notesnook.API.Controllers
return Ok(monograph);
}
- [HttpGet("{id}/destruct")]
+ [HttpGet("{id}/view")]
[AllowAnonymous]
- public async Task DestructMonographAsync([FromRoute] string id)
+ public async Task TrackView([FromRoute] string id)
{
var monograph = await Monographs.GetAsync(id);
- if (monograph == null)
- {
- return NotFound(new
- {
- error = "invalid_id",
- error_description = $"No such monograph found."
- });
- }
+ if (monograph == null) return Content(SVG_PIXEL, "image/svg+xml");
if (monograph.SelfDestruct)
await Monographs.DeleteByIdAsync(monograph.Id);
- return Ok();
+ return Content(SVG_PIXEL, "image/svg+xml");
}
[HttpDelete("{id}")]