File tree Expand file tree Collapse file tree 5 files changed +15
-6
lines changed
Expand file tree Collapse file tree 5 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " reactmap" ,
3- "version" : " 1.2.0 " ,
3+ "version" : " 1.2.1 " ,
44 "description" : " React based frontend map." ,
55 "main" : " ReactMap.mjs" ,
66 "author" :
" TurtIeSocks <[email protected] >" ,
Original file line number Diff line number Diff line change 354354 "joinGymBadgeTable" : false ,
355355 "hideOldQuests" : false ,
356356 "maxConnections" : 10 ,
357- "startupDelayMs" : 1000
357+ "startupDelayMs" : 1000 ,
358+ "availableRetryCount" : 5
358359 },
359360 "schemas" : [
360361 {
Original file line number Diff line number Diff line change @@ -605,7 +605,7 @@ module.exports = class Pokestop extends Model {
605605 }
606606 } )
607607
608- if ( finalList . length === 0 ) {
608+ if ( finalList . size === 0 ) {
609609 return fetchQuests ( )
610610 }
611611
@@ -754,7 +754,7 @@ module.exports = class Pokestop extends Model {
754754 getAreaSql ( query , perms . areaRestrictions , isMad )
755755 }
756756 const results = await query
757- const mapped = results . map ( q => ( { ...q , with_ar : true } ) )
757+ const mapped = results . map ( q => ( { ...q , with_ar : q . with_ar ?? true } ) )
758758
759759 if ( hasAltQuests ) {
760760 const altQuestQuery = this . query ( )
Original file line number Diff line number Diff line change 1+ /* eslint-disable no-promise-executor-return */
12/* eslint-disable no-await-in-loop */
23/* eslint-disable no-console */
34const { promises : fs } = require ( 'fs' )
@@ -16,6 +17,7 @@ module.exports = class EventManager {
1617 this . uicons = [ ]
1718 this . baseUrl = 'https://raw.githubusercontent.com/WatWowMap/wwm-uicons/main/'
1819 this . webhookObj = { }
20+ this . pokestopTry = 1
1921
2022 setTimeout ( async ( ) => {
2123 // Set initials, comes with a timeout just to make sure all databases get configured first
@@ -24,9 +26,11 @@ module.exports = class EventManager {
2426 this . available . nests = await Db . getAvailable ( 'Nest' )
2527 this . available . pokemon = await Db . getAvailable ( 'Pokemon' )
2628 this . available . pokestops = await Db . getAvailable ( 'Pokestop' )
27- while ( ! this . available . pokestops . length ) {
28- console . log ( 'Trying again...' )
29+ while ( ! this . available . pokestops . length && this . pokestopTry <= config . database . settings . availableRetryCount ) {
30+ console . log ( `[EVENT] No pokestops found, trying again in 1 second (attempt ${ this . pokestopTry } / ${ config . database . settings . availableRetryCount } )` )
31+ await new Promise ( resolve => setTimeout ( resolve , 1000 ) )
2932 this . available . pokestops = await Db . getAvailable ( 'Pokestop' )
33+ this . pokestopTry += 1
3034 }
3135 await this . getMasterfile ( )
3236 await this . getInvasions ( )
Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ if (hasLittle) {
7373 config . api . pvp . leagueObj . little = hasLittle . littleCupRules ? 500 : { little : false , cap : 500 }
7474}
7575
76+ if ( ! config . authentication . strategies . length || ! config . authentication . strategies . find ( strategy => strategy . enabled ) ) {
77+ config . authentication . alwaysEnabledPerms = Object . keys ( config . authentication . perms )
78+ }
79+
7680// Map manual areas
7781config . manualAreas = Object . fromEntries ( config . manualAreas . map ( area => [ area . name , area ] ) )
7882
You can’t perform that action at this time.
0 commit comments