added user favorites

This commit is contained in:
orangix
2023-08-20 07:58:38 +02:00
parent 877ee7faa9
commit 9fd38bed03
6 changed files with 155 additions and 1 deletions

View File

@@ -88,7 +88,7 @@ func main() {
} else {
app.Use("/static", filesystem.New(filesystem.Config{
MaxAge: 2592000,
Root: http.FS(static.GetFiles()),
Root: http.FS(static.GetFiles()),
}))
app.Use(cache.New(cache.Config{
Expiration: 30 * time.Minute,
@@ -123,6 +123,7 @@ func main() {
app.Get("/t/:tag/:postID", pages.HandlePost)
app.Get("/r/:sub/:postID", pages.HandlePost)
app.Get("/user/:userID", pages.HandleUser)
app.Get("/user/:userID/favorites", pages.HandleUserFavorites)
app.Get("/user/:userID/comments", pages.HandleUserComments)
app.Get("/user/:userID/cover", pages.HandleUserCover)
app.Get("/user/:userID/avatar", pages.HandleUserAvatar)