diff options
Diffstat (limited to 'controllers/posts.go')
| -rw-r--r-- | controllers/posts.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/controllers/posts.go b/controllers/posts.go new file mode 100644 index 0000000..6fdcd26 --- /dev/null +++ b/controllers/posts.go @@ -0,0 +1,22 @@ +package controllers
+
+import (
+ "imageboard/utils/shortcuts"
+
+ "github.com/gofiber/fiber/v2"
+)
+
+func PostsController(ctx *fiber.Ctx) error {
+ ctx.Locals("Title", "Posts")
+
+ searchQuery := ctx.Query("tags", "")
+
+ customdata := struct {
+ SearchQuery string
+ Posts []interface{}
+ }{
+ SearchQuery: searchQuery,
+ Posts: []interface{}{},
+ }
+ return shortcuts.Render(ctx, "posts", customdata)
+}
|
