diff --git a/.github/workflows/build-tele.yml b/.github/workflows/build-tele.yml index 56aa07d..95c266f 100644 --- a/.github/workflows/build-tele.yml +++ b/.github/workflows/build-tele.yml @@ -50,8 +50,8 @@ jobs: - name: SSH into the server and update the code run: | ssh $SERVER_USERNAME@$SERVER_IP \ - "wget -qO - https://raw.githubusercontent.com/thedmdim/ytstalker/master/docker-compose.yml > /root/ytstalker/docker-compose.yml - & docker compose -f /root/ytstalker/docker-compose.yml up --pull always -d tele" + "wget -qO - https://raw.githubusercontent.com/thedmdim/ytstalker/master/docker-compose.yml > /root/ytstalker/docker-compose.yml \ + && docker compose -f /root/ytstalker/docker-compose.yml up --pull always -d tele" env: SERVER_USERNAME: ${{ secrets.SERVER_USERNAME }} SERVER_IP: ${{ secrets.SERVER_IP }} \ No newline at end of file diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index 644f3f1..2cc0623 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -51,9 +51,9 @@ jobs: - name: SSH into the server and update the code run: | ssh $SERVER_USERNAME@$SERVER_IP \ - "wget -qO - https://raw.githubusercontent.com/thedmdim/ytstalker/master/docker-compose.yml > /root/ytstalker/docker-compose.yml - & wget -qO - https://raw.githubusercontent.com/thedmdim/ytstalker/master/Caddyfile > /root/ytstalker/Caddyfile - & docker compose -f /root/ytstalker/docker-compose.yml up --pull always -d app caddy" + "wget -qO - https://raw.githubusercontent.com/thedmdim/ytstalker/master/docker-compose.yml > /root/ytstalker/docker-compose.yml \ + && wget -qO - https://raw.githubusercontent.com/thedmdim/ytstalker/master/Caddyfile > /root/ytstalker/Caddyfile \ + && docker compose -f /root/ytstalker/docker-compose.yml up --pull always -d app caddy" env: SERVER_USERNAME: ${{ secrets.SERVER_USERNAME }} SERVER_IP: ${{ secrets.SERVER_IP }} diff --git a/cmd/app/handlers/video_handler.go b/cmd/app/handlers/video_handler.go index 82e0d13..3091fe4 100644 --- a/cmd/app/handlers/video_handler.go +++ b/cmd/app/handlers/video_handler.go @@ -47,6 +47,7 @@ func (s *Router) GetVideo(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusBadGateway) return } + res.Reactions, _ = GetReaction(conn, res.Video.ID) encoder.Encode(res) } diff --git a/cmd/tele/main.go b/cmd/tele/main.go index a0ea43f..50a4267 100644 --- a/cmd/tele/main.go +++ b/cmd/tele/main.go @@ -61,7 +61,6 @@ func main() { continue } - text := "Title: " + video.Title + "\n" + "Views: " + strconv.FormatInt(video.Views, 10) + "\n" + "Uploaded: " + time.Unix(video.UploadedAt, 0).Format("02.01.2006") + "\n" +