Typo
Cette révision appartient à :
Parent
82c5767ac4
révision
97efa46a29
1 fichiers modifiés avec 2 ajouts et 2 suppressions
|
@ -38,7 +38,7 @@ func PostCommentHandler(w http.ResponseWriter, r *http.Request) {
|
|||
if !captcha.Authenticate(userCaptcha) {
|
||||
http.Error(w, "bad captcha", 403)
|
||||
}
|
||||
currentUser := GetUser()
|
||||
currentUser := GetUser(r)
|
||||
content := p.Sanitize(r.FormValue("comment"))
|
||||
|
||||
idNum, err := strconv.Atoi(id)
|
||||
|
@ -46,7 +46,7 @@ func PostCommentHandler(w http.ResponseWriter, r *http.Request) {
|
|||
userId := 0
|
||||
if (currentUser.Id > 0) {
|
||||
username = currentUser.Username
|
||||
userId = currentUser.Id
|
||||
userId = int(currentUser.Id)
|
||||
}
|
||||
comment := model.Comment{Username: username, UserId: userId, Content: content, TorrentId: idNum}
|
||||
db.ORM.Create(&comment)
|
||||
|
|
Référencer dans un nouveau ticket