-
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 pull request #103 from Giveth/Replace-ortto-External-Embedded-W…
…ebform-for-Onboarding-guide Replace ortto External Embedded Webform for Onboarding guide
- Loading branch information
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
migrations/1719410008992-seedNotificationTypeForOnboardingGuide.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,26 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
import { NotificationType, SCHEMA_VALIDATORS_NAMES } from '../src/entities/notificationType'; | ||
import { NOTIFICATION_CATEGORY, NOTIFICATION_TYPE_NAMES } from '../src/types/general'; | ||
import { MICRO_SERVICES } from '../src/utils/utils'; | ||
|
||
const OnboardingNotificationType = [ | ||
{ | ||
name: NOTIFICATION_TYPE_NAMES.SUBSCRIBE_ONBOARDING, | ||
description: NOTIFICATION_TYPE_NAMES.SUBSCRIBE_ONBOARDING, | ||
microService: MICRO_SERVICES.givethio, | ||
category: NOTIFICATION_CATEGORY.ORTTO, | ||
schemaValidator: SCHEMA_VALIDATORS_NAMES.SUBSCRIBE_ONBOARDING, | ||
} | ||
] | ||
|
||
export class seedNotificationTypeForOnboardingGuide1719410008992 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.manager.save(NotificationType, OnboardingNotificationType); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DELETE FROM notification_type WHERE "name" = 'Subscribe onboarding';`, | ||
); | ||
} | ||
} |
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