Revert "fix(server): DriveFile related N+1 query when call note packMany (#10133)"

This reverts commit 452a48e7f4.
This commit is contained in:
syuilo 2023-03-03 20:26:44 +09:00
parent da3fcf178e
commit a7c82eeabc
5 changed files with 58 additions and 66 deletions

View file

@ -41,8 +41,7 @@ export class GalleryPostEntityService {
title: post.title,
description: post.description,
fileIds: post.fileIds,
// TODO: packMany causes N+1 queries
files: this.driveFileEntityService.packManyByIds(post.fileIds),
files: this.driveFileEntityService.packMany(post.fileIds),
tags: post.tags.length > 0 ? post.tags : undefined,
isSensitive: post.isSensitive,
likedCount: post.likedCount,