Skip to content

Commit

Permalink
Cache warning
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Dec 13, 2023
1 parent b0c575c commit acb922d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routes/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ func ApiWrapperCacheStatistics(context *gin.Context) {
return
}

if !config.UseCache {
context.JSON(http.StatusBadRequest, gin.H{"error": "Caching is not enabled, so a cache request is useless."})
context.Abort()
return
}

// Check connection to every Tautulli server
for i := 0; i < len(config.TautulliConfig); i++ {
log.Println("Checking Tautulli server '" + config.TautulliConfig[i].TautulliName + "'.")
Expand Down

0 comments on commit acb922d

Please sign in to comment.