Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update torrentParam.go

Cette révision appartient à :
kilo 2017-10-29 04:12:33 +01:00 révisé par GitHub
Parent ac933b1ec0
révision 67ab9dfa8c
Aucune clé n'a été trouvée pour cette signature dans la base de données
ID de la clé GPG: 4AEE18F83AFDEB23

Voir le fichier

@ -48,6 +48,7 @@ type TorrentParam struct {
Dlsite string
VideoQuality string
Tags Tags
Abort bool
}
// Identifier returns a unique identifier for the struct
@ -136,6 +137,8 @@ func (p *TorrentParam) FromRequest(c *gin.Context) {
user, _, _, err := users.FindByUsername(username)
if err == nil {
p.UserID = uint32(user.ID)
} else {
p.Abort = true
}
}
// For other functions, we need to set userID in the request query