Skip to content

Commit 6b261c1

Browse files
committed
ref is always a path pattern
1 parent b3b6864 commit 6b261c1

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/v2/providers/database.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ export interface ReferenceOptions extends options.EventHandlerOptions {
8383
/**
8484
* Specify the handler to trigger on a database reference(s).
8585
* This value can either be a single reference or a pattern.
86-
* Examples~ '/foo/bar', '/foo/{bar} '
86+
* Examples: '/foo/bar', '/foo/{bar}'
8787
*/
8888
ref: string;
8989
/**
9090
* Specify the handler to trigger on a database instance(s).
9191
* If present, this value can either be a single instance or a pattern.
92-
* Examples~ 'my-instance-1', '{instance}'
92+
* Examples: 'my-instance-1', '{instance}'
9393
*/
9494
instance?: string;
9595
}
@@ -418,12 +418,9 @@ export function onOperation(
418418
const specificOpts = options.optionsToEndpoint(opts);
419419

420420
const eventFilters: Record<string, string> = {};
421-
const eventFilterPathPatterns: Record<string, string> = {};
422-
if (path.match(WILDCARD_REGEX) || path.includes('*')) {
423-
eventFilterPathPatterns.ref = path;
424-
} else {
425-
eventFilters.ref = path;
426-
}
421+
const eventFilterPathPatterns: Record<string, string> = {
422+
ref: path,
423+
};
427424
if (instance.match(WILDCARD_REGEX) || instance.includes('*')) {
428425
eventFilterPathPatterns.instance = instance;
429426
} else {

0 commit comments

Comments
 (0)