Skip to content

Commit

Permalink
fix: update method to use object.update etc
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 30, 2023
1 parent a75e00e commit 39f2368
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CoCreateNotification {
// Function to generate VAPID keys (public and private)
addUser(data) {
this.crud.send({
method: 'update.object',
method: 'object.update',
array: 'clients',
object: {
_id: data.clientId,
Expand Down Expand Up @@ -60,7 +60,7 @@ class CoCreateNotification {
newKeys = { ...newKeys, ...data.subscription }
} else {
newKeys = await this.crud.send({
method: 'read.object',
method: 'object.read',
array: 'clients',
object: {
_id: data.clientId
Expand Down Expand Up @@ -91,7 +91,7 @@ class CoCreateNotification {
const jwt = webpush.generateRequestDetails(data.subscription, null, tokenOptions);

this.crud.send({
method: 'update.object',
method: 'object.update',
array: 'clients',
object: {
_id: data.clientId,
Expand All @@ -111,7 +111,7 @@ class CoCreateNotification {
if (!subscription) {
try {
subscription = await this.crud.send({
method: 'read.object',
method: 'object.read',
array: 'clients',
object: {
_id: data.clientId
Expand Down

0 comments on commit 39f2368

Please sign in to comment.