File tree Expand file tree Collapse file tree
src/routes/projects/options Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,6 +285,18 @@ router.route('/').get(
285285 options [ field ] = counts ;
286286 } ) ;
287287 }
288+ // This is the moment to do any last changes to the results
289+ // Here are the hardcodes to solve silly issues or not "good looking" numbers
290+ // Remove MD interaction-analyses with the numerated name
291+ const mdAnalysesKey = 'mds.analyses.name' ;
292+ const numeratedAnalysisPattern = / - [ 0 - 9 ] * $ / ;
293+ if ( mdAnalysesKey in options ) {
294+ const mdAnalyses = options [ mdAnalysesKey ] ;
295+ Object . keys ( mdAnalyses ) . forEach ( key => {
296+ // If it ends in '-xx' where xx is any number of numeric characters
297+ if ( key . match ( numeratedAnalysisPattern ) ) delete mdAnalyses [ key ] ;
298+ } ) ;
299+ }
288300 // LORE: We no longer sort the final response, this is now done by the client
289301 // LORE: You can not rely in objects order and returning everything as arrays is not efficient
290302 // Send all mined data
You can’t perform that action at this time.
0 commit comments