summaryrefslogtreecommitdiff
path: root/DebugController.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2025-08-17 22:10:27 +1000
committerJake Mannens <jake@asger.xyz>2025-08-18 10:59:28 +1000
commit6c53f3dc43f072dce4ffe4a1bd306074dd20ff39 (patch)
tree494335104504dca462a3837c3993e2add8e72bad /DebugController.cs
Initial commit
Diffstat (limited to 'DebugController.cs')
-rw-r--r--DebugController.cs22
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