go-gallery/routers/album/photo.go

26 lines
445 B
Go
Raw Normal View History

2018-04-30 02:13:01 +00:00
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) {
album, ok := c.Get("album")
if !ok {
c.NotFound("album not found")
return
}
_, err := models.GetPhoto(album.(map[string]interface{})["id"].(string))
if err != nil {
c.ServerError(nil)
return
}
}