Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fixed torrentRequest function

Cette révision appartient à :
akuma06 2017-07-04 03:05:00 +02:00
Parent 920e4069a1
révision fb6bcc68d7

Voir le fichier

@ -195,7 +195,8 @@ func writeTorrentToDisk(file multipart.File, name string, fullpath *string) erro
}
// NewTorrentRequest : creates a new torrent request struc with some default value
func NewTorrentRequest(params ...string) (torrentRequest *torrentValidator.TorrentRequest) {
func NewTorrentRequest(params ...string) *torrentValidator.TorrentRequest {
torrentRequest := &torrentValidator.TorrentRequest{}
if len(params) > 1 {
torrentRequest.Category = params[0]
} else {
@ -206,5 +207,5 @@ func NewTorrentRequest(params ...string) (torrentRequest *torrentValidator.Torre
} else {
torrentRequest.Description = "Description"
}
return
return torrentRequest
}