Files
sablier/internal/api/theme_list.go
Alexis Couvreur fca9c79289 refactor: reorganize code structure (#556)
* refactor: rename providers to Provider

* refactor folders

* fix build cmd

* fix build cmd

* fix build cmd

* fix cmd start
2025-03-10 14:11:40 -04:00

18 lines
336 B
Go

package api
import (
"github.com/gin-gonic/gin"
"net/http"
)
func ListThemes(router *gin.RouterGroup, s *ServeStrategy) {
handler := func(c *gin.Context) {
c.JSON(http.StatusOK, map[string]interface{}{
"themes": s.Theme.List(),
})
}
router.GET("/themes", handler)
router.GET("/dynamic/themes", handler) // Legacy path
}