mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
refactor: async/await file
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
var nconf = require('nconf');
|
||||
var meta = require('./meta');
|
||||
const nconf = require('nconf');
|
||||
const meta = require('./meta');
|
||||
|
||||
var coverPhoto = module.exports;
|
||||
const coverPhoto = module.exports;
|
||||
|
||||
coverPhoto.getDefaultGroupCover = function (groupName) {
|
||||
return getCover('groups', groupName);
|
||||
@@ -17,7 +17,7 @@ coverPhoto.getDefaultProfileCover = function (uid) {
|
||||
function getCover(type, id) {
|
||||
const defaultCover = nconf.get('relative_path') + '/assets/images/cover-default.png';
|
||||
if (meta.config[type + ':defaultCovers']) {
|
||||
var covers = String(meta.config[type + ':defaultCovers']).trim().split(/[\s,]+/g);
|
||||
const covers = String(meta.config[type + ':defaultCovers']).trim().split(/[\s,]+/g);
|
||||
let coverPhoto = defaultCover;
|
||||
if (!covers.length) {
|
||||
return coverPhoto;
|
||||
|
||||
Reference in New Issue
Block a user