Skip to content

Commit

Permalink
FIX: Don't include technical subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred78290 committed Dec 9, 2023
1 parent 6ce3902 commit c7e3ef9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "afp-apicore-sdk",
"version": "1.1.10",
"version": "1.1.11",
"description": "Node helper functions to authenticate and fetch AFP API apicore",
"main": "dist/afp-apicore-sdk.js",
"browser": "dist/afp-apicore-sdk.umd.js",
Expand Down
7 changes: 4 additions & 3 deletions src/apicore/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import moment from 'moment-timezone'
const timeFormat = 'HH:mm:ss'
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
const utc = 'UTC'
const withoutcreditRate = '_withoutcreditRate'

interface Status {
code: number
Expand Down Expand Up @@ -348,7 +349,7 @@ export class ApiCoreNotificationCenter {
}
})

return data.response.subscriptions
return data.response.subscriptions?.filter((subscription) => ! subscription.name.endsWith(withoutcreditRate))
}

public async subscriptionsInSharedService (service: string, clientID: string, userID: string) {
Expand All @@ -365,7 +366,7 @@ export class ApiCoreNotificationCenter {
}
})

return data.response.subscriptions
return data.response.subscriptions?.filter((subscription) => ! subscription.name.endsWith(withoutcreditRate))
}

public async subscriptionsInService (service: string) {
Expand All @@ -378,7 +379,7 @@ export class ApiCoreNotificationCenter {
}
})

return data.response.subscriptions
return data.response.subscriptions?.filter((subscription) => ! subscription.name.endsWith(withoutcreditRate))
}

public async addManagedSubscription (name: string, service: string, userID: string, query: Subscription) {
Expand Down

0 comments on commit c7e3ef9

Please sign in to comment.