MCPcopy
hub / github.com/parse-community/parse-server / performAction

Function performAction

src/InstallationDedup.js:26–50  ·  view source on GitHub ↗
({
  database,
  query,
  action,
  fieldToClear,
  runOptions,
  many,
  validSchemaController,
})

Source from the content-addressed store, hash-verified

24}
25
26async function performAction({
27 database,
28 query,
29 action,
30 fieldToClear,
31 runOptions,
32 many,
33 validSchemaController,
34}) {
35 if (action === 'delete') {
36 return database.destroy(CLASS_NAME, query, runOptions, validSchemaController);
37 }
38 if (action === 'update') {
39 return database.update(
40 CLASS_NAME,
41 query,
42 { [fieldToClear]: { __op: 'Delete' } },
43 { ...runOptions, many },
44 false,
45 false,
46 validSchemaController
47 );
48 }
49 throw new Error(`Unknown installation dedup action: ${action}`);
50}
51
52/**
53 * Removes or updates `_Installation` rows that hold a `deviceToken` matching the query,

Callers 2

Calls 2

destroyMethod · 0.80
updateMethod · 0.80

Tested by

no test coverage detected