Skip to content

Commit

Permalink
fix: notification token model fix references
Browse files Browse the repository at this point in the history
  • Loading branch information
jzunigax2 committed Jul 1, 2024
1 parent 52bd2dd commit 71b66e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,6 @@ export default (database: Sequelize) => {
[Limit.name]: Limit,
[PaidPlans.name]: PaidPlans,
[TierLimit.name]: TierLimit,
[UserNotificationToken.name]: UserNotificationToken,
['userNotificationToken']: UserNotificationToken,
};
};
2 changes: 1 addition & 1 deletion src/app/routes/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ export class StorageController {
private async getTokensAndSendNotification(userUuid: string) {
const tokens = await this.services.User.getUserNotificationTokens(userUuid, 'macos');

tokens.forEach((token: string) => {
tokens.forEach(({ token }: { token: string }) => {
this.services.Apn.sendStorageNotification(token, userUuid);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ module.exports = (Model, App) => {
if (type !== null) {
whereClause.type = type;
}
return Model.UserNotificationToken.findAll({ where: whereClause });
return Model.userNotificationToken.findAll({ where: whereClause });
};

return {
Expand Down

0 comments on commit 71b66e3

Please sign in to comment.