26 lines
445 B
Go
26 lines
445 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) {
|
|
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
|
|
}
|
|
}
|