Skip to content

Commit

Permalink
Adjust selector on model details page
Browse files Browse the repository at this point in the history
  • Loading branch information
JustMaier committed Jan 17, 2023
1 parent 11000ea commit 7eeda58
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/server/selectors/model.selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const getAllModelsWithVersionsSelect = Prisma.validator<Prisma.ModelSelec
},
});

export const modelWithDetailsSelect = (includeNSFW = true, prioritizeSafeImages = false) =>
export const modelWithDetailsSelect = (includeNSFW = true) =>
Prisma.validator<Prisma.ModelSelect>()({
id: true,
name: true,
Expand All @@ -119,8 +119,6 @@ export const modelWithDetailsSelect = (includeNSFW = true, prioritizeSafeImages
user: {
select: {
id: true,
name: true,
email: true,
image: true,
username: true,
rank: { select: { leaderboardRank: true } },
Expand All @@ -140,9 +138,6 @@ export const modelWithDetailsSelect = (includeNSFW = true, prioritizeSafeImages
inaccurate: true,
baseModel: true,
images: {
// orderBy: prioritizeSafeImages
// ? [{ image: { nsfw: 'asc' } }, { index: 'asc' }]
// : [{ index: 'asc' }],
orderBy: { index: 'asc' },
select: {
index: true,
Expand Down

0 comments on commit 7eeda58

Please sign in to comment.