From d9d3bf0bce4775569c4cda9f500445aa14574231 Mon Sep 17 00:00:00 2001 From: Eric G Date: Sun, 28 Jun 2020 05:29:27 +0200 Subject: [PATCH] feat: support department location selector in leboncoin (#5073) Co-authored-by: gileri --- lib/routes/leboncoin/ad.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/routes/leboncoin/ad.js b/lib/routes/leboncoin/ad.js index e761a91ef..93c7b4780 100644 --- a/lib/routes/leboncoin/ad.js +++ b/lib/routes/leboncoin/ad.js @@ -31,6 +31,10 @@ const convertQueryToFilters = (query) => { return { locationType: 'department_near', department_id: l.slice(3) }; } + if (l.startsWith('d_')) { + return { locationType: 'department', department_id: l.slice(2) }; + } + { if (l.match(/.+_.+/)) { const [city, zipcode] = l.split('_');