Skip to content

Commit

Permalink
refactor(back): store status, credits and submission on static map list
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa96 committed Mar 2, 2024
1 parent 3297e8a commit efde006
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions apps/backend/src/app/modules/maps/map-list.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ export class MapListService implements OnModuleInit {
fileName: true,
hash: true,
status: true,
createdAt: true,
images: true,
thumbnail: true,
info: true,
leaderboards: true,
info: true
credits: { include: { user: true } },
submission:
type === FlatMapList.SUBMISSION
? { include: { currentVersion: true } }
: undefined,
createdAt: true
}
});

Expand Down
11 changes: 9 additions & 2 deletions libs/db/src/scripts/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,17 @@ prismaWrapper(async (prisma: PrismaClient) => {
name: true,
fileName: true,
hash: true,
createdAt: true,
status: true,
images: true,
thumbnail: true,
info: true,
leaderboards: true,
info: true
credits: { include: { user: true } },
submission:
type === FlatMapList.SUBMISSION
? { include: { currentVersion: true } }
: undefined,
createdAt: true
}
});

Expand Down

0 comments on commit efde006

Please sign in to comment.