Skip to content

Commit 212a36d

Browse files
committed
fix: shelter search fix select
1 parent a464ba8 commit 212a36d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/shelter/shelter.service.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
UpdateShelterSchema,
1111
} from './types';
1212
import { SeachQueryProps } from '@/decorators/search-query/types';
13-
import { SupplyPriority } from '../supply/types';
1413

1514
@Injectable()
1615
export class ShelterService {
@@ -194,23 +193,23 @@ export class ShelterService {
194193
createdAt: true,
195194
updatedAt: true,
196195
shelterSupplies: {
197-
where: {
198-
priority: {
199-
gte: SupplyPriority.Needing,
200-
},
201-
},
202-
take: 10,
203196
select: {
204197
priority: true,
205198
supply: {
206199
select: {
200+
id: true,
207201
name: true,
202+
supplyCategory: {
203+
select: {
204+
id: true,
205+
name: true,
206+
},
207+
},
208+
createdAt: true,
209+
updatedAt: true,
208210
},
209211
},
210212
},
211-
orderBy: {
212-
priority: 'desc',
213-
},
214213
},
215214
},
216215
});

0 commit comments

Comments
 (0)