Cache warning

This commit is contained in:
aunefyren 2023-12-13 16:30:15 +01:00
parent b0c575cf25
commit acb922db65

View file

@ -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 + "'.")