Skip to content

Commit 1148321

Browse files
committed
Fix enum cast
1 parent fadd56f commit 1148321

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openworkers-api",
3-
"version": "1.5.4",
3+
"version": "1.5.5",
44
"license": "MIT",
55
"module": "src/index.ts",
66
"type": "module",

src/services/db/databases.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export async function createPlatformDatabase(userId: string, input: CreatePlatfo
7474
userId: uuid(userId),
7575
name: input.name,
7676
desc: input.desc ?? null,
77-
provider: enumCast('platform' as DatabaseProvider, 'database_provider'),
77+
provider: enumCast<DatabaseProvider>('platform', 'enum_database_provider'),
7878
schemaName: input.schemaName,
7979
maxRows: input.maxRows,
8080
timeoutSeconds: input.timeoutSeconds
@@ -98,7 +98,7 @@ export async function createPostgresDatabase(userId: string, input: CreatePostgr
9898
userId: uuid(userId),
9999
name: input.name,
100100
desc: input.desc ?? null,
101-
provider: enumCast('postgres' as DatabaseProvider, 'database_provider'),
101+
provider: enumCast<DatabaseProvider>('postgres', 'enum_database_provider'),
102102
connectionString: input.connectionString,
103103
maxRows: input.maxRows,
104104
timeoutSeconds: input.timeoutSeconds

0 commit comments

Comments
 (0)