Apply suggestions from code review

Thanks for all the tweaks @advplyr!

Co-authored-by: advplyr <67830747+advplyr@users.noreply.github.com>
This commit is contained in:
Ben 2022-09-03 14:23:20 -04:00 committed by GitHub
parent f64c74519b
commit adba22cbd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 34 deletions

View file

@ -260,10 +260,9 @@ class MiscController {
}
// GET: api/social
async getSocialStats(req, res) {
if (this.db.serverSettings.sharedListeningStats == false) {
if (!this.db.serverSettings.sharedListeningStats) {
return res.sendStatus(404)
}
Logger.error(this.db.serverSettings.sharedListeningStats)
var filteredUsers = this.db.users.filter(c => c.settings.shareListeningActivity == true)
var userData = []
for (let i = 0; i < filteredUsers.length; i++) {