Skip to content

Commit c231cb7

Browse files
committed
fix: pass options to repository methods
Signed-off-by: Muhammad Aaqil <[email protected]>
1 parent 43a0c3a commit c231cb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/rest-crud/src/crud-rest.controller.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function defineCrudRestController<
164164
@param.filter(modelCtor)
165165
filter?: Filter<T>,
166166
): Promise<(T & Relations)[]> {
167-
return this.repository.find(filter);
167+
return this.repository.find(filter, options);
168168
}
169169

170170
@get('/{id}', {
@@ -190,7 +190,7 @@ export function defineCrudRestController<
190190
@param.where(modelCtor)
191191
where?: Where<T>,
192192
): Promise<Count> {
193-
return this.repository.count(where);
193+
return this.repository.count(where, options);
194194
}
195195
}
196196

@@ -234,6 +234,7 @@ export function defineCrudRestController<
234234
// with no explicit type-casts required
235235
data as DataObject<T>,
236236
where,
237+
options,
237238
);
238239
}
239240

0 commit comments

Comments
 (0)