@@ -103,8 +103,7 @@ class Pokestop extends Model {
103103 } = args
104104 const midnight = getUserMidnight ( args )
105105 const ts = Math . floor ( Date . now ( ) / 1000 )
106- const { queryLimits, stopValidDataLimit, hideOldPokestops } =
107- config . getSafe ( 'api' )
106+ const { queryLimits, stopValidDataLimit } = config . getSafe ( 'api' )
108107
109108 const {
110109 lures : lurePerms ,
@@ -116,9 +115,7 @@ class Pokestop extends Model {
116115 } = perms
117116
118117 const query = this . query ( )
119- if ( hideOldPokestops ) {
120- query . where ( 'pokestop.updated' , '>' , ts - stopValidDataLimit * 86400 )
121- }
118+ query . where ( 'pokestop.updated' , '>' , ts - stopValidDataLimit * 86400 )
122119
123120 Pokestop . joinIncident ( query , hasMultiInvasions , multiInvasionMs )
124121 query
@@ -1320,8 +1317,7 @@ class Pokestop extends Model {
13201317 return quest
13211318 }
13221319
1323- // eslint-disable-next-line no-empty-pattern
1324- static async search ( perms , args , { } , distance , bbox ) {
1320+ static async search ( perms , args , distance , bbox ) {
13251321 const { onlyAreas = [ ] , search = '' } = args
13261322 const query = this . query ( )
13271323 . select ( [ 'name' , 'id' , 'lat' , 'lon' , 'url' , distance ] )
@@ -1478,8 +1474,7 @@ class Pokestop extends Model {
14781474 return mapped . map ( ( result ) => this . parseRdmRewards ( result ) ) . filter ( Boolean )
14791475 }
14801476
1481- // eslint-disable-next-line no-empty-pattern
1482- static async searchLures ( perms , args , { } , distance , bbox ) {
1477+ static async searchLures ( perms , args , distance , bbox ) {
14831478 const { search, onlyAreas = [ ] , locale } = args
14841479 const ts = Math . floor ( Date . now ( ) / 1000 )
14851480
@@ -1635,7 +1630,7 @@ class Pokestop extends Model {
16351630 * @returns {Promise<{ hasConfirmedInvasions: boolean }> }
16361631 */
16371632 static async getFilterContext ( { hasConfirmed } ) {
1638- if ( ! hasConfirmed ) return { hasConfirmedInvasions : false }
1633+ if ( false || ! hasConfirmed ) return { hasConfirmedInvasions : false }
16391634 const result = await this . query ( )
16401635 . from ( 'incident' )
16411636 . count ( 'id' , { as : 'total' } )
0 commit comments