update
This commit is contained in:
+2
-2
@@ -32,8 +32,8 @@ func GetPhotos(album string) (photo []Photo, err error) {
|
||||
}
|
||||
|
||||
// GetPhoto -
|
||||
func GetPhoto(id string) (photo *Photo, err error) {
|
||||
rows, err := x.Query(`select "id", "album", "name", "thumbnail", "ctime", "mtime" from "storage"."photo" where "id" = $1`, id)
|
||||
func GetPhoto(album, id string) (photo *Photo, err error) {
|
||||
rows, err := x.Query(`select "id", "album", "name", "thumbnail", "ctime", "mtime" from "storage"."photo" where "album" = $1 and "id" = $2`, album, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user