Skip to content

Commit

Permalink
Release 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfagun74 committed Oct 19, 2023
2 parents e5180ae + a9c2766 commit 4821109
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# GameVault Backend Server Changelog

## 8.0.2

Recommended Gamevault App Version: `v1.7.0`

### Changes

- Fixed Bug [#268](https://github.com/Phalcode/gamevault-app/issues/268) where your games could not be filtered based on their tags and genres.
- Also made Tags API faster by limiting pages to 100 results by default.

## 8.0.1

Recommended Gamevault App Version: `v1.7.0`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gamevault-backend",
"version": "8.0.1",
"version": "8.0.2",
"description": "the self-hosted gaming platform for drm-free games",
"author": "Alkan Alper, Schäfer Philip GbR / Phalcode",
"private": true,
Expand Down
12 changes: 11 additions & 1 deletion src/modules/games/games.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,20 @@ export class GamesController {
})
@MinimumRole(Role.GUEST)
async get(@Paginate() query: PaginateQuery): Promise<Paginated<Game>> {
const relations = ["box_image"];
if (query.filter["genres.name"]) {
relations.push("genres");
}
if (query.filter["tags.name"]) {
relations.push("tags");
}

return paginate(query, this.gamesRepository, {
paginationType: PaginationType.TAKE_AND_SKIP,
defaultLimit: 100,
maxLimit: NO_PAGINATION,
nullSort: "last",
relations: ["box_image"],
relations,
sortableColumns: [
"id",
"title",
Expand All @@ -96,6 +104,8 @@ export class GamesController {
average_playtime: all_filters,
early_access: all_filters,
type: all_filters,
"genres.name": all_filters,
"tags.name": all_filters,
},
withDeleted: false,
});
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tags/tags.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TagsController {
async getTags(@Paginate() query: PaginateQuery): Promise<Paginated<Tag>> {
const paginatedResults = await paginate(query, this.tagRepository, {
paginationType: PaginationType.TAKE_AND_SKIP,
defaultLimit: Number.MAX_SAFE_INTEGER,
defaultLimit: 100,
maxLimit: NO_PAGINATION,
nullSort: "last",
relations: ["games"],
Expand Down

0 comments on commit 4821109

Please sign in to comment.