Skip to content

Commit b61479c

Browse files
committed
test(plugin-webhooks): read the stored webhook row with typed query options
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
1 parent cf97ed4 commit b61479c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/plugins/plugin-webhooks/src/webhook-get-retired-34098.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ describe('webhook method GET retired — the save door (sys_webhook select)', ()
181181
(err: any) => err,
182182
);
183183
expect(refused).toMatchObject({ code: 'VALIDATION_FAILED' });
184-
const stored: any = await driver.findOne('sys_webhook', { where: { id: row.id } } as any);
184+
const stored: any = await driver.findOne('sys_webhook', { where: { id: row.id } });
185185
expect(stored.method).toBe('post');
186186
} finally {
187187
await driver.disconnect();
@@ -232,9 +232,9 @@ describe('webhook method GET retired — a stored GET row is parked, never conve
232232
expect(parkedReports[0].meta).toMatchObject({ code: 'VALIDATION_ERROR', status: 400, method: 'GET' });
233233

234234
// No conversion: the method reads exactly as stored.
235-
const raw: any = await driver.findOne('sys_webhook', { where: { id } } as any);
235+
const raw: any = await driver.findOne('sys_webhook', { where: { id } });
236236
expect(raw.method).toBe('get');
237-
const served: any = await engine.findOne('sys_webhook', { where: { id }, ...SYSTEM } as any);
237+
const served: any = await engine.findOne('sys_webhook', { where: { id }, ...SYSTEM });
238238
expect(served.method).toBe('get');
239239
} finally {
240240
await enqueuer.stop();

0 commit comments

Comments
 (0)