MCPcopy
hub / github.com/directus/directus / setDefaultOptions

Method setDefaultOptions

api/src/services/revisions.ts:29–43  ·  view source on GitHub ↗
(opts?: MutationOptions)

Source from the content-addressed store, hash-verified

27 }
28
29 private setDefaultOptions(opts?: MutationOptions): MutationOptions {
30 if (!opts) {
31 return { autoPurgeCache: false, bypassLimits: true };
32 }
33
34 if (!('autoPurgeCache' in opts)) {
35 opts.autoPurgeCache = false;
36 }
37
38 if (!('bypassLimits' in opts)) {
39 opts.bypassLimits = true;
40 }
41
42 return opts;
43 }
44
45 override async createOne(data: Partial<Item>, opts?: MutationOptions): Promise<PrimaryKey> {
46 return super.createOne(data, this.setDefaultOptions(opts));

Callers 4

createOneMethod · 0.95
createManyMethod · 0.95
updateOneMethod · 0.95
updateManyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected