feat: update post detail page

This commit is contained in:
yanghao05
2025-04-25 11:39:28 +08:00
parent 505c41e9ef
commit b8c2c245f2
15 changed files with 191 additions and 76 deletions

View File

@@ -19,6 +19,13 @@ func (f *Middlewares) Auth(ctx fiber.Ctx) error {
return ctx.Next()
}
uu, err := models.Users.GetByID(ctx.Context(), 1)
if err != nil {
return ctx.SendString("NOT OK")
}
ctx.Locals("user", uu)
return ctx.Next()
fullUrl := string(ctx.Request().URI().FullURI())
u, err := url.Parse(fullUrl)
if err != nil {