Commit 4c15de6a authored by Rafael's avatar Rafael

post album without thumbnail but hopefully working

parent b5bdb291
Pipeline #20159755 passed with stage
in 1 minute and 32 seconds
......@@ -4,6 +4,7 @@ import (
"database/sql"
"fmt"
"math"
"os"
"strconv"
"strings"
"time"
......@@ -408,10 +409,11 @@ func getAlbuns(db *sql.DB, postsIDArray []string) map[string]interface{} {
albuns[p.postID].(map[string]interface{})["photos"] = make([]map[string]string, 0, 10)
}
photo := make(map[string]string)
mediaURL := os.Getenv("MEDIA_URL")
photo["title"] = p.title
photo["alt"] = p.alt
photo["image"] = p.url
photo["thumbnail"] = "/crop?width=84&height=84&url=" + p.url
photo["image"] = mediaURL + p.url
photo["thumbnail"] = mediaURL + p.url
album := albuns[p.postID].(map[string]interface{})["photos"]
album = append(album.([]map[string]string), photo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment