28 lines
438 B
Go
28 lines
438 B
Go
package album
|
|
|
|
import (
|
|
"git.trj.tw/golang/go-gallery/models"
|
|
"git.trj.tw/golang/go-gallery/modules/context"
|
|
)
|
|
|
|
// GetAllAlbumPhotos -
|
|
func GetAllAlbumPhotos(c *context.Context) {
|
|
|
|
}
|
|
|
|
// GetPhoto -
|
|
func GetPhoto(c *context.Context) {
|
|
data, ok := c.Get("album")
|
|
album := data.(models.Album)
|
|
if !ok {
|
|
c.NotFound("album not found")
|
|
return
|
|
}
|
|
|
|
_, err := models.GetPhoto(album.ID)
|
|
if err != nil {
|
|
c.ServerError(nil)
|
|
return
|
|
}
|
|
}
|