diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-08 13:20:21 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-08-08 13:20:21 +1000 |
| commit | 701d474949e5cb72b8ed7b29fec45ad74580f570 (patch) | |
| tree | 0eea7adfdd9d7dde4dd44535cd172d7e6a4f8737 /DebugController.cs | |
Initial commit
Diffstat (limited to 'DebugController.cs')
| -rw-r--r-- | DebugController.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/DebugController.cs b/DebugController.cs new file mode 100644 index 0000000..7a87729 --- /dev/null +++ b/DebugController.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore.Mvc; + +namespace HyperBooru; + +#if DEBUG +[ApiController] +[Route("/debug")] +public class DebugController : Controller { + private HyperBooruDbContext db; + + public DebugController(HyperBooruDbContext db) => + this.db = db; + + [HttpGet("media")] + public IActionResult Media() => + Ok(db.Media.ToList()); + + [HttpGet("tags")] + public IActionResult TagDefinitions() => + Ok(db.Tags.ToList()); +} +#endif
\ No newline at end of file |
