Skip to content

Commit

Permalink
Merge pull request #652 from WatWowMap/develop
Browse files Browse the repository at this point in the history
Sync Dev to Main
  • Loading branch information
TurtIeSocks authored Feb 4, 2023
2 parents 07a0c5f + 2aa9d1b commit 97e5633
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactmap",
"version": "1.9.5",
"version": "1.9.6",
"description": "React based frontend map.",
"main": "ReactMap.js",
"author": "TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com>",
Expand Down
12 changes: 9 additions & 3 deletions server/src/models/Pokestop.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,10 @@ module.exports = class Pokestop extends Model {
'power_up_end_timestamp',
])
}
if (perms.eventStops && filters.onlyEventStops) {
if (
perms.eventStops &&
(filters.onlyAllPokestops || filters.onlyEventStops)
) {
filtered.events = pokestop.invasions
.filter((event) =>
isMad && !hasMultiInvasions
Expand All @@ -651,10 +654,13 @@ module.exports = class Pokestop extends Model {
: event.display_type,
}))
}
if (perms.invasions && filters.onlyInvasions) {
if (
perms.invasions &&
(filters.onlyAllPokestops || filters.onlyInvasions)
) {
filtered.invasions = pokestop.invasions.filter(
(invasion) =>
filters[`i${invasion.grunt_type}`] &&
(filters[`i${invasion.grunt_type}`] || filters.onlyAllPokestops) &&
(isMad && !hasMultiInvasions
? !MADE_UP_MAD_INVASIONS.includes(invasion.grunt_type)
: invasion.grunt_type),
Expand Down
6 changes: 3 additions & 3 deletions server/src/services/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ if (!fs.existsSync(resolve(`${__dirname}/../configs/local.json`))) {
config.database.schemas.push({
host: REACT_MAP_DB_HOST,
port: +REACT_MAP_DB_PORT,
database: REACT_MAP_DB_USERNAME,
username: REACT_MAP_DB_PASSWORD,
password: REACT_MAP_DB_NAME,
database: REACT_MAP_DB_NAME,
username: REACT_MAP_DB_USERNAME,
password: REACT_MAP_DB_PASSWORD,
useFor: ['session', 'user'],
})
} else {
Expand Down
1 change: 1 addition & 0 deletions src/components/tiles/Pokestop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const areEqual = (prev, next) =>
prev.item.lure_expire_timestamp === next.item.lure_expire_timestamp &&
prev.item.quests?.length === next.item.quests?.length &&
prev.item.invasions?.length === next.item.invasions?.length &&
prev.item.events?.length === next.item.events?.length &&
prev.item.updated === next.item.updated &&
prev.showTimer === next.showTimer &&
(prev.item.quests && next.item.quests
Expand Down

0 comments on commit 97e5633

Please sign in to comment.