Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit f981265

Browse files
committed
bugfix
1 parent 3fdc3f7 commit f981265

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vote-service/app/http/controllers/controllers.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
jwt "github.com/dgrijalva/jwt-go"
1515
"github.com/urfave/negroni"
1616

17+
"fmt"
18+
1719
"github.com/bstaijen/mariadb-for-microservices/shared/helper"
1820
sharedModels "github.com/bstaijen/mariadb-for-microservices/shared/models"
1921
"github.com/bstaijen/mariadb-for-microservices/shared/util"
@@ -120,9 +122,12 @@ func GetVotesFromAUser(connection *sql.DB, cnf config.Config) negroni.HandlerFun
120122
t := make([]*sharedModels.HasVotedRequest, 0)
121123
g := make([]*sharedModels.VoteCountRequest, 0)
122124
for _, v := range photos {
125+
126+
fmt.Printf("PhotoID %v, UserID %v \n", v.ID, ID)
127+
123128
t = append(t, &sharedModels.HasVotedRequest{
124129
PhotoID: v.ID,
125-
UserID: v.UserID,
130+
UserID: int(ID),
126131
})
127132
g = append(g, &sharedModels.VoteCountRequest{
128133
PhotoID: v.ID,

0 commit comments

Comments
 (0)