Skip to content

Commit

Permalink
Use panics
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Oct 30, 2023
1 parent ceb8633 commit e957bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func handleRequest(c *gin.Context) {
if discordFile, exists = cache[path]; !exists || discordFile == nil || discordFile.ExpireAt.Before(time.Now()) {
discordFile, err = getFileForMessageAttachment(chanId, messageId, filename)
if err != nil {
return
panic(err)
}
cache[path] = discordFile
}
Expand All @@ -72,7 +72,7 @@ func handleRequest(c *gin.Context) {

contents, err := getFileFromCDN(discordFile.Url)
if err != nil {
return
panic(err)
}

escaped := template.HTMLEscapeString(string(contents))
Expand Down

0 comments on commit e957bf9

Please sign in to comment.