Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Category router

Smaug#6739a7f21b800b5d
diff --git a/backend/router/routes/categories.go b/backend/router/routes/categories.go
new file mode 100644
index 00000000..945a17d4
--- /dev/null
+++ b/backend/router/routes/categories.go
@@ -0,0 +1,17 @@
+package routes
+
+import (
+ "alexandrie/app"
+ "alexandrie/controllers"
+ "alexandrie/middlewares"
+ "alexandrie/utils"
+
+ "github.com/gin-gonic/gin"
+)
+
+func Categories(app *app.App, router *gin.RouterGroup) {
+ doc := router.Group("/categories")
+ docCtrl := controllers.NewCategoriesController(app)
+
+ doc.GET("/:userId", middlewares.Auth(), utils.WP(docCtrl.GetCategories))
+}