Skip to content

Commit 0efe4c7

Browse files
committed
Added landing_intent field to v2/v3 find and sort builders
1 parent c7e0cd4 commit 0efe4c7

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

src/builders/v2/find.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,11 @@ module.exports = r => {
193193
if (r.query.reused) {
194194
query['rocket.first_stage.cores.reused'] = (r.query.reused === 'true');
195195
}
196-
if (r.query.land_success) {
197-
query['rocket.first_stage.cores.land_success'] = (r.query.land_success === 'true');
196+
if (r.query.landing_intent) {
197+
query['rocket.first_stage.cores.landing_intent'] = (r.query.landing_intent === 'true');
198+
}
199+
if (r.query.landing_type) {
200+
query['rocket.first_stage.cores.landing_type'] = r.query.landing_type;
198201
}
199202
if (r.query.landing_type) {
200203
query['rocket.first_stage.cores.landing_type'] = r.query.landing_type;

src/builders/v2/sort.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ module.exports = r => {
126126
if (r.query.sort === 'land_success') {
127127
query['rocket.first_stage.cores.land_success'] = direction;
128128
}
129+
if (r.query.sort === 'landing_intent') {
130+
query['rocket.first_stage.cores.landing_intent'] = direction;
131+
}
129132
if (r.query.sort === 'landing_type') {
130133
query['rocket.first_stage.cores.landing_type'] = direction;
131134
}

src/builders/v3/find.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ module.exports = r => {
196196
if (r.query.land_success) {
197197
query['rocket.first_stage.cores.land_success'] = (r.query.land_success === 'true');
198198
}
199+
if (r.query.landing_intent) {
200+
query['rocket.first_stage.cores.landing_intent'] = (r.query.landing_intent === 'true');
201+
}
199202
if (r.query.landing_type) {
200203
query['rocket.first_stage.cores.landing_type'] = r.query.landing_type;
201204
}

src/builders/v3/sort.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ module.exports = r => {
177177
if (r.query.sort === 'land_success') {
178178
query['rocket.first_stage.cores.land_success'] = direction;
179179
}
180+
if (r.query.sort === 'landing_intent') {
181+
query['rocket.first_stage.cores.landing_intent'] = direction;
182+
}
180183
if (r.query.sort === 'landing_type') {
181184
query['rocket.first_stage.cores.landing_type'] = direction;
182185
}

0 commit comments

Comments
 (0)