-
Notifications
You must be signed in to change notification settings - Fork 0
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 #25 from game-node-app/dev
- Added icons for platforms groups
- Loading branch information
Showing
14 changed files
with
92 additions
and
63 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/game/game-repository/dto/icon-names-for-platform-request.dto.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,8 @@ | ||
import { IsArray, IsNotEmpty, IsString } from "class-validator"; | ||
|
||
export class IconNamesForPlatformRequestDto { | ||
@IsNotEmpty() | ||
@IsArray() | ||
@IsString({ each: true }) | ||
platformAbbreviations: string[]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export const platformAbbreviationToIconMap: { [p: string]: string[] } = { | ||
steam: ["PC", "Linux"], | ||
playstation: ["PS1", "PS2", "PS3", "PS4", "PS5", "PSP", "PSVR", "PSVR2"], | ||
xbox: ["XBOX", "X360", "XONE"], | ||
nintendo: ["N64", "NES", "NDS", "NGC", "SNES", "3DS", "Switch"], | ||
sega: [ | ||
"SMS", | ||
"segacd", | ||
"Sega32", | ||
"Saturn", | ||
"Genesis/Megadrive", | ||
"Game Gear", | ||
], | ||
}; |
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import { BaseFindDto } from "../../utils/base-find.dto"; | ||
import { Statistics } from "../entity/statistics.entity"; | ||
import { GameRepositoryFilterDto } from "../../game/game-repository/dto/game-repository-filter.dto"; | ||
import { IsOptional } from "class-validator"; | ||
import { IsEnum, IsNotEmpty, IsOptional } from "class-validator"; | ||
import { StatisticsPeriod } from "../statistics.constants"; | ||
|
||
export class FindStatisticsTrendingGamesDto extends BaseFindDto<Statistics> { | ||
@IsOptional() | ||
criteria?: GameRepositoryFilterDto; | ||
@IsNotEmpty() | ||
@IsEnum(StatisticsPeriod) | ||
period: StatisticsPeriod; | ||
} |
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import { IsNumber, IsOptional } from "class-validator"; | ||
import { IsEnum, IsNotEmpty, IsNumber, IsOptional } from "class-validator"; | ||
import { BaseFindDto } from "../../utils/base-find.dto"; | ||
import { Statistics } from "../entity/statistics.entity"; | ||
import { StatisticsPeriod } from "../statistics.constants"; | ||
|
||
export class FindStatisticsTrendingReviewsDto extends BaseFindDto<Statistics> { | ||
@IsOptional() | ||
@IsNumber() | ||
gameId?: number; | ||
@IsNotEmpty() | ||
@IsEnum(StatisticsPeriod) | ||
period: StatisticsPeriod; | ||
} |
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