Skip to content

Commit

Permalink
fix: create migration to change givbacks notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Reshzera committed Jul 24, 2024
1 parent c8fe8a6 commit 37cfa70
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 4 deletions.
18 changes: 14 additions & 4 deletions migrations/1660716115917-seedNotificationType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,19 +770,29 @@ export const GivethNotificationTypes = {
htmlTemplate: [
{
type: 'p',
content: 'You have ',
content: 'Your GIVback ',
},
{
type: 'b',
content: '$amount',
},
{
type: 'p',
content: ' GIV is ready to claim! ',
},
{ type: 'br' },
{
type: 'a',
content: 'GIVbacks',
content: 'Click here',
href: '/givbacks',
},
{
type: 'p',
content: ' waiting to be claimed!',
content: ' to take a shortcut.',
},
],
content: 'You have GIVbacks waiting to be claimed!',
content:
'Your GIVback {amount} GIV is ready to claim! \n[Click here] to take a shortcut.',
},
PROJECT_EDITED: {
name: 'Project edited',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { NotificationType } from '../src/entities/notificationType';

export class changeSeedNotificationTypeForGIVbackNotification1721823068405
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.manager.update(
NotificationType,
{ name: 'GIVback is ready to claim' },
{
htmlTemplate: [
{
type: 'p',
content: 'You have ',
},
{
type: 'a',
content: 'GIVbacks',
href: '/givbacks',
},
{
type: 'p',
content: ' waiting to be claimed!',
},
],
content: 'You have GIVbacks waiting to be claimed!',
},
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.manager.update(
NotificationType,
{ name: 'GIVback is ready to claim' },
{
htmlTemplate: [
{
type: 'p',
content: 'Your GIVback ',
},
{
type: 'b',
content: '$amount',
},
{
type: 'p',
content: ' GIV is ready to claim! ',
},
{ type: 'br' },
{
type: 'a',
content: 'Click here',
href: '/givbacks',
},
{
type: 'p',
content: ' to take a shortcut.',
},
],
content:
'Your GIVback {amount} GIV is ready to claim! \n[Click here] to take a shortcut.',
},
);
}
}

0 comments on commit 37cfa70

Please sign in to comment.