Skip to content

Commit

Permalink
Fix "Unique visitor count and anonymisation (#304)"
Browse files Browse the repository at this point in the history
  • Loading branch information
electerious committed Jan 16, 2022
1 parent da2f8b8 commit ca93ab8
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/database/records.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ const update = async (id) => {
)
}

const anonymize = async (clientId, ignoreId) => {
const anonymize = (clientId, ignoreId) => {
// Don't return anything about the update
await Record.updateMany({
return Record.updateMany({
$and: [
{ clientId },
{
Expand All @@ -81,19 +81,19 @@ const anonymize = async (clientId, ignoreId) => {
},
],
}, {
clientId: undefined,
siteLanguage: undefined,
screenWidth: undefined,
screenHeight: undefined,
screenColorDepth: undefined,
deviceName: undefined,
deviceManufacturer: undefined,
osName: undefined,
osVersion: undefined,
browserName: undefined,
browserVersion: undefined,
browserWidth: undefined,
browserHeight: undefined,
clientId: null,
siteLanguage: null,
screenWidth: null,
screenHeight: null,
screenColorDepth: null,
deviceName: null,
deviceManufacturer: null,
osName: null,
osVersion: null,
browserName: null,
browserVersion: null,
browserWidth: null,
browserHeight: null,
})
}

Expand Down

0 comments on commit ca93ab8

Please sign in to comment.