Skip to content

Commit

Permalink
Forgot to create variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiloutre committed Sep 5, 2017
1 parent 3d95db5 commit b616ed1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/torrent/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func DownloadTorrent(c *gin.Context) {

if hash == "" && len(config.Get().Torrents.FileStorage) == 0 {
//File not found, send 404
variables := templates.Commonvariables(c)
templates.Render(c, "errors/torrent_file_missing.jet.html", variables)
return
}
Expand All @@ -27,6 +28,7 @@ func DownloadTorrent(c *gin.Context) {
Openfile, err := os.Open(fmt.Sprintf("%s%c%s.torrent", config.Get().Torrents.FileStorage, os.PathSeparator, hash))
if err != nil {
//File not found, send 404
variables := templates.Commonvariables(c)
templates.Render(c, "errors/torrent_file_missing.jet.html", variables)
return
}
Expand All @@ -40,6 +42,7 @@ func DownloadTorrent(c *gin.Context) {

if err != nil {
//File not found, send 404
variables := templates.Commonvariables(c)
templates.Render(c, "errors/torrent_file_missing.jet.html", variables)
return
}
Expand Down

0 comments on commit b616ed1

Please sign in to comment.