mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 06:24:30 +00:00
feat(asset): refactor version stack to surface latest metadata and add UI support
This commit is contained in:
@@ -29,18 +29,19 @@ export class SearchService {
|
||||
where.parentId = { in: targetFolderIds }
|
||||
}
|
||||
|
||||
const targetType = req.assetType === 'folder' ? AssetType.folder : AssetType.file
|
||||
const targetTypes =
|
||||
req.assetType === 'folder' ? [AssetType.folder] : [AssetType.file, AssetType.version_stack]
|
||||
const typeCondition: Prisma.AssetWhereInput = req.showSymlink
|
||||
? {
|
||||
OR: [
|
||||
{ type: targetType },
|
||||
{ type: { in: targetTypes } },
|
||||
{
|
||||
type: AssetType.symlink,
|
||||
target: { type: targetType },
|
||||
target: { type: { in: targetTypes } },
|
||||
},
|
||||
],
|
||||
}
|
||||
: { type: targetType }
|
||||
: { type: { in: targetTypes } }
|
||||
|
||||
if (req.conditions && req.conditions.length > 0) {
|
||||
const conditionPredicates: Prisma.AssetWhereInput[] = req.conditions.map((cond) => {
|
||||
|
||||
Reference in New Issue
Block a user