Skip to content

Commit

Permalink
Make notificationCenterAdapter compatible with new notification types
Browse files Browse the repository at this point in the history
related to #697
  • Loading branch information
mohammadranjbarz committed Oct 23, 2022
1 parent 6be3483 commit 0406323
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/adapters/notifications/MockNotificationAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ export class MockNotificationAdapter implements NotificationAdapterInterface {
return Promise.resolve(undefined);
}

projectReceivedHeartReaction(params: {
project: Project;
user: User;
}): Promise<void> {
projectReceivedHeartReaction(params: { project: Project }): Promise<void> {
logger.info('MockNotificationAdapter projectReceivedHeartReaction', {
projectSlug: params.project.slug,
user: params.user,
});
return Promise.resolve(undefined);
}
Expand Down
5 changes: 1 addition & 4 deletions src/adapters/notifications/NotificationAdapterInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export interface NotificationAdapterInterface {
donor: User;
}): Promise<void>;

projectReceivedHeartReaction(params: {
project: Project;
user: User;
}): Promise<void>;
projectReceivedHeartReaction(params: { project: Project }): Promise<void>;

projectVerified(params: { project: Project }): Promise<void>;
projectUnVerified(params: { project: Project }): Promise<void>;
Expand Down
1 change: 0 additions & 1 deletion src/adapters/notifications/NotificationCenterAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export class NotificationCenterAdapter implements NotificationAdapterInterface {

async projectReceivedHeartReaction(params: {
project: Project;
user: User;
}): Promise<void> {
const { project } = params;
return this.sendProjectRelatedNotification({
Expand Down
1 change: 0 additions & 1 deletion src/resolvers/reactionResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ export class ReactionResolver {
const userWhoLiked = (await findUserById(user.userId)) as User;
await getNotificationAdapter().projectReceivedHeartReaction({
project,
user: userWhoLiked,
});
return reaction;
} catch (e) {
Expand Down

0 comments on commit 0406323

Please sign in to comment.