mirror of
https://github.com/wisplite/raster.git
synced 2026-05-01 06:32:44 -05:00
21 lines
448 B
Go
21 lines
448 B
Go
package routes
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/wisplite/raster/internal/services"
|
|
)
|
|
|
|
func RegisterAlbumRoutes(rg *gin.RouterGroup) {
|
|
album := rg.Group("/albums")
|
|
album.GET("/getPublic", func(c *gin.Context) {
|
|
albums, err := services.GetPublicAlbums()
|
|
if err != nil {
|
|
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
|
return
|
|
}
|
|
c.JSON(http.StatusOK, albums)
|
|
})
|
|
}
|