From 0c1b9bd52ac703df1f2a153a90aea2b05ce10bcf Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Tue, 25 Jul 2023 10:44:26 +0200 Subject: [PATCH] adding handling for hdp in legacy site for works list --- portfolio/src/routes/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/portfolio/src/routes/index.js b/portfolio/src/routes/index.js index 466bdde..e5b3514 100644 --- a/portfolio/src/routes/index.js +++ b/portfolio/src/routes/index.js @@ -126,6 +126,10 @@ router.get('/works_list', function(req, res, next) { if( (titleToSearch.indexOf('one') !== -1) && (titleToSearch.indexOf('two') !== -1)){ titleToSearch = 'two'; } + if( (titleToSearch == 'berger-knuth') || (titleToSearch == 'robinson') || (titleToSearch == 'penrose') || (titleToSearch == 'ammann') || (titleToSearch == 'kari-culik') || (titleToSearch == 'jaendel-rao')){ + titleToSearch = 'a history of the domino problem'; + } + // bug: why is mercado san juan or first not updating? db.collection('events').find( { $text: { $search: "\"" + titleToSearch + "\"" } } ).toArray(function (err, events1) { db.collection('events').find( { 'program' : { "$elemMatch" : { 'work' : { $regex : titleToSearch.replace('(','\\(').replace(')','\\)'), $options : 'i' } } } } ).toArray(function (err, events2) {