Skip to content

Commit eee7dc1

Browse files
authored
Merge pull request #31 from SOS-RS/develop
develop into main
2 parents b0cbbdc + ce9dd68 commit eee7dc1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/shelter/shelter.service.ts

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

1416
@Injectable()
1517
export class ShelterService {
@@ -70,6 +72,11 @@ export class ShelterService {
7072
latitude: true,
7173
longitude: true,
7274
shelterSupplies: {
75+
where: {
76+
priority: {
77+
gt: SupplyPriority.UnderControl,
78+
},
79+
},
7380
select: {
7481
priority: true,
7582
supply: {
@@ -119,6 +126,11 @@ export class ShelterService {
119126
createdAt: true,
120127
updatedAt: true,
121128
shelterSupplies: {
129+
where: {
130+
priority: {
131+
gt: SupplyPriority.UnderControl,
132+
},
133+
},
122134
select: {
123135
priority: true,
124136
supply: {
@@ -193,6 +205,11 @@ export class ShelterService {
193205
createdAt: true,
194206
updatedAt: true,
195207
shelterSupplies: {
208+
where: {
209+
priority: {
210+
gt: SupplyPriority.UnderControl,
211+
},
212+
},
196213
select: {
197214
priority: true,
198215
supply: {

0 commit comments

Comments
 (0)