Skip to content

Commit 98be232

Browse files
committed
refactor: Replace isGet boolean flag with options object
1 parent 2a5dce9 commit 98be232

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/rest.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ async function runFindTriggers(
3131
restOptions,
3232
clientSDK,
3333
context,
34-
isGet
34+
options = {}
3535
) {
36+
const { isGet } = options;
3637
const result = await triggers.maybeRunQueryTrigger(
3738
triggers.Types.beforeFind,
3839
className,
@@ -91,7 +92,7 @@ const find = async (config, auth, className, restWhere, restOptions, clientSDK,
9192
restOptions,
9293
clientSDK,
9394
context,
94-
false
95+
{ isGet: false }
9596
);
9697
};
9798

@@ -106,7 +107,7 @@ const get = async (config, auth, className, objectId, restOptions, clientSDK, co
106107
restOptions,
107108
clientSDK,
108109
context,
109-
true
110+
{ isGet: true }
110111
);
111112
};
112113

0 commit comments

Comments
 (0)