Przeglądaj źródła

added baths

master
Dunja Djokic 4 lat temu
rodzic
commit
24427f5be1
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6
    0
      app.js

+ 6
- 0
app.js Wyświetl plik

const beds = req.body.beds; const beds = req.body.beds;
const type = req.body.type; const type = req.body.type;
const lifestyle = req.body.lifestyle; const lifestyle = req.body.lifestyle;
const baths = req.body.baths;


// query builder // query builder
var query = `https://www.apartments.com`; var query = `https://www.apartments.com`;
query += `/${beds}-bedrooms`; query += `/${beds}-bedrooms`;
} }


if (baths) {
query += `${beds ? '-' : '/'}${baths}-bathrooms`;
}

if (price) { if (price) {
if (beds) { if (beds) {
query += `-over-${price}`; query += `-over-${price}`;
location: location, location: location,
description: description, description: description,
filters: [ filters: [
{ name: 'baths', value: baths },
{ name: 'price', value: price }, { name: 'price', value: price },
{ name: 'beds', value: beds }, { name: 'beds', value: beds },
{ name: 'type', value: type }, { name: 'type', value: type },

Ładowanie…
Anuluj
Zapisz