-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/staging' into add-eslint
# Conflicts: # src/services/notificationService.ts # src/types/general.ts # src/types/notifications.ts
- Loading branch information
Showing
7 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
migrations/1718888344202-seedNotificationTypeForNotifyRewardAmount.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
import { NOTIFICATION_CATEGORY, NOTIFICATION_TYPE_NAMES } from '../src/types/general'; | ||
import { MICRO_SERVICES } from '../src/utils/utils'; | ||
import { NotificationType, SCHEMA_VALIDATORS_NAMES } from '../src/entities/notificationType'; | ||
|
||
const NotifyRewardAmountNotificationType = [ | ||
{ | ||
name: NOTIFICATION_TYPE_NAMES.NOTIFY_REWARD_AMOUNT, | ||
description: NOTIFICATION_TYPE_NAMES.NOTIFY_REWARD_AMOUNT, | ||
microService: MICRO_SERVICES.givethio, | ||
category: NOTIFICATION_CATEGORY.NOTIFY_REWARD_AMOUNT, | ||
schemaValidator: SCHEMA_VALIDATORS_NAMES.NOTIFY_REWARD_AMOUNT, | ||
title: "Notify reward report", | ||
} | ||
] | ||
|
||
export class seedNotificationTypeForNotifyRewardAmount1718888344202 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.manager.save(NotificationType, NotifyRewardAmountNotificationType); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DELETE FROM notification_type WHERE "name" = ${NOTIFICATION_TYPE_NAMES.NOTIFY_REWARD_AMOUNT};`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters