set up backend project structure and started on initial models and routes

This commit is contained in:
wisplite
2025-08-27 02:32:52 -05:00
parent 80bf7e9cf2
commit 8263f9c50a
11 changed files with 318 additions and 7 deletions
+20
View File
@@ -0,0 +1,20 @@
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)
})
}