Showing
1 changed file
with
7 additions
and
7 deletions
@@ -359,13 +359,13 @@ const listNew = (req, res, next) => { | @@ -359,13 +359,13 @@ const listNew = (req, res, next) => { | ||
359 | seoTitle = stringProcess.decodeURIComponent(paramsTitle); | 359 | seoTitle = stringProcess.decodeURIComponent(paramsTitle); |
360 | } | 360 | } |
361 | 361 | ||
362 | - logger.info('seoTitle:' + seoTitle); | ||
363 | - | ||
364 | - try { | ||
365 | - categoryIntroRedis = | ||
366 | - yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); | ||
367 | - } catch (e) { | ||
368 | - logger.error('redis.hmgetAsync.category.description:' + e); | 362 | + if (seoTitle) { |
363 | + try { | ||
364 | + categoryIntroRedis = | ||
365 | + yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); // eslint-disable-line | ||
366 | + } catch (e) { | ||
367 | + logger.error('redis.hmgetAsync.category.description:' + e); | ||
368 | + } | ||
369 | } | 369 | } |
370 | 370 | ||
371 | let categoryIntro = categoryIntroRedis[1] ? { | 371 | let categoryIntro = categoryIntroRedis[1] ? { |
-
Please register or login to post a comment