Skip to content

Commit 3cbf69c

Browse files
committed
Remove function checks
1 parent c2434ea commit 3cbf69c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/operation.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ async function beforeQuery(opts: {
6060
if (dataSource?.plugins?.length) {
6161
await Promise.all(
6262
dataSource.plugins.map(async (plugin: StarbasePlugin) => {
63-
if (typeof plugin.beforeQuery === 'function') {
64-
const { sql: _sql, params: _params } =
65-
await plugin.beforeQuery(opts)
66-
sql = _sql
67-
params = _params
68-
}
63+
const { sql: _sql, params: _params } =
64+
await plugin.beforeQuery(opts)
65+
sql = _sql
66+
params = _params
6967
})
7068
)
7169
}
@@ -86,9 +84,7 @@ async function afterQuery(opts: {
8684
if (dataSource?.plugins?.length) {
8785
await Promise.all(
8886
dataSource.plugins.map(async (plugin: StarbasePlugin) => {
89-
if (typeof plugin.afterQuery === 'function') {
90-
result = await plugin.afterQuery(opts)
91-
}
87+
result = await plugin.afterQuery(opts)
9288
})
9389
)
9490
}

worker-configuration.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface Env {
66
REGION: 'auto'
77
STUDIO_USER: 'admin'
88
STUDIO_PASS: '123456'
9-
ENABLE_ALLOWLIST: 1
9+
ENABLE_ALLOWLIST: 0
1010
ENABLE_RLS: 0
1111
EXTERNAL_DB_TYPE: 'postgresql'
1212
AUTH_ALGORITHM: 'RS256'

0 commit comments

Comments
 (0)