Skip to content

Commit

Permalink
fix(backend/services): Switch Riot icon to SVG (#197)
Browse files Browse the repository at this point in the history
* fix: Riot icon to SVG

* fix: naming
  • Loading branch information
EdenComp authored Nov 4, 2023
1 parent bbdf6c9 commit a90a520
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/back/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import { CreateRiotGamesActions1698964479850 } from "./workflows/seed/1698964479
import { CreateTodoistCreateTaskReaction1699101589099 } from "./workflows/seed/1699101589099-CreateTodoistCreateTaskReaction";
import { CreateAirtableDeleteRecordReaction1699107944021 } from "./workflows/seed/1699107944021-CreateAirtableDeleteRecordReaction";
import { CreateTwitterCreateTweetReaction1699115775099 } from "./workflows/seed/1699115775099-CreateTwitterCreateTweetReaction";
import { ChangeRiotLogoToSvg1699116526789 } from "./services/seed/1699116526789-ChangeRiotLogoToSvg";

dotenv.config();

Expand Down Expand Up @@ -159,6 +160,7 @@ export const DATA_SOURCE_OPTIONS: DataSourceOptions = {
CreateTodoistCreateTaskReaction1699101589099,
CreateAirtableDeleteRecordReaction1699107944021,
CreateTwitterCreateTweetReaction1699115775099,
ChangeRiotLogoToSvg1699116526789,
],
synchronize: process.env.NODE_ENV === "development",
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { MigrationInterface, QueryRunner } from "typeorm";

export class ChangeRiotLogoToSvg1699116526789 implements MigrationInterface {
private readonly PREVIOUS_RIOT_IMAGE = "https://i.pinimg.com/originals/90/6d/23/906d231cbaff55c77fb97191592e1c76.png";
private readonly NEW_RIOT_IMAGE = "https://asset.brandfetch.io/idtxF1ugCc/idSaLQdGtL.svg";

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE service
SET image_url = '${this.NEW_RIOT_IMAGE}'
WHERE id = 'riot'`,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE service
SET image_url = '${this.PREVIOUS_RIOT_IMAGE}'
WHERE id = 'riot'`,
);
}
}

0 comments on commit a90a520

Please sign in to comment.