mirror of
https://github.com/wisplite/raster.git
synced 2026-05-01 06:32:44 -05:00
update authorization tokens and add/fix create album endpoint
This commit is contained in:
@@ -40,6 +40,10 @@ func RegisterAlbumRoutes(rg *gin.RouterGroup) {
|
||||
Description string `json:"description"`
|
||||
ParentID string `json:"parentId"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&request); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
result, err := services.CreateAlbum(accessToken, request.Title, request.Description, request.ParentID)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
|
||||
Reference in New Issue
Block a user