Skip to content

Commit

Permalink
🐛 (pinger) fix accessing the region field
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis committed Jun 3, 2024
1 parent f3cc2a1 commit 31e29d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/resolvers/Pinger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
price_min: (item) => item.price_min,
price_max: (item) => item.price_max,
price_type: (item) => item.price_type.toUpperCase(),
region: (item) => item.region,
region: (item) => item.location,
rooms_min: (item) => item.rooms_min,
rooms_max: (item) => item.rooms_max,
area_m2_min: (item) => item.area_m2_min,
Expand Down
4 changes: 2 additions & 2 deletions src/resolvers/Pinger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const pinger = {
price_min: 10000,
price_max: 100000,
price_type: 'total',
region: '',
location: '',
rooms_min: null,
rooms_max: null,
area_m2_min: null,
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('Pinger', () => {
describe('region', () => {
it('returns region value', () => {
const output = resolvers.region(pinger);
expect(output).toEqual(pinger.region);
expect(output).toEqual(pinger.location);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/PingerWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function normalizeFields(info) {
price_min: 'price_min',
price_max: 'price_max',
price_type: 'price_type',
region: 'region',
region: 'location',
rooms_min: 'rooms_min',
rooms_max: 'rooms_max',
area_m2_min: 'area_m2_min',
Expand Down

0 comments on commit 31e29d3

Please sign in to comment.