Skip to content

Commit b29bd70

Browse files
committed
chore: replace deprecated types
1 parent a6c9471 commit b29bd70

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/lib/types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const postgresColumnSchema = Type.Object({
2020
table_id: Type.Integer(),
2121
schema: Type.String(),
2222
table: Type.String(),
23-
id: Type.RegEx(/^(\d+)\.(\d+)$/),
23+
id: Type.RegExp(/^(\d+)\.(\d+)$/),
2424
ordinal_position: Type.Integer(),
2525
name: Type.String(),
2626
default_value: Type.Unknown(),
@@ -508,7 +508,7 @@ export const postgresTablePrivilegesRevokeSchema = Type.Object({
508508
export type PostgresTablePrivilegesRevoke = Static<typeof postgresTablePrivilegesRevokeSchema>
509509

510510
export const postgresColumnPrivilegesSchema = Type.Object({
511-
column_id: Type.RegEx(/^(\d+)\.(\d+)$/),
511+
column_id: Type.RegExp(/^(\d+)\.(\d+)$/),
512512
relation_schema: Type.String(),
513513
relation_name: Type.String(),
514514
column_name: Type.String(),
@@ -529,7 +529,7 @@ export const postgresColumnPrivilegesSchema = Type.Object({
529529
export type PostgresColumnPrivileges = Static<typeof postgresColumnPrivilegesSchema>
530530

531531
export const postgresColumnPrivilegesGrantSchema = Type.Object({
532-
column_id: Type.RegEx(/^(\d+)\.(\d+)$/),
532+
column_id: Type.RegExp(/^(\d+)\.(\d+)$/),
533533
grantee: Type.String(),
534534
privilege_type: Type.Union([
535535
Type.Literal('ALL'),
@@ -543,7 +543,7 @@ export const postgresColumnPrivilegesGrantSchema = Type.Object({
543543
export type PostgresColumnPrivilegesGrant = Static<typeof postgresColumnPrivilegesGrantSchema>
544544

545545
export const postgresColumnPrivilegesRevokeSchema = Type.Object({
546-
column_id: Type.RegEx(/^(\d+)\.(\d+)$/),
546+
column_id: Type.RegExp(/^(\d+)\.(\d+)$/),
547547
grantee: Type.String(),
548548
privilege_type: Type.Union([
549549
Type.Literal('ALL'),

src/server/routes/roles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default async (fastify: FastifyInstance) => {
7474
pg: Type.String(),
7575
}),
7676
params: Type.Object({
77-
id: Type.RegEx(/\d+/),
77+
id: Type.RegExp(/\d+/),
7878
}),
7979
response: {
8080
200: postgresRoleSchema,
@@ -150,7 +150,7 @@ export default async (fastify: FastifyInstance) => {
150150
pg: Type.String(),
151151
}),
152152
params: Type.Object({
153-
id: Type.RegEx(/\d+/),
153+
id: Type.RegExp(/\d+/),
154154
}),
155155
body: postgresRoleUpdateSchema,
156156
response: {
@@ -195,7 +195,7 @@ export default async (fastify: FastifyInstance) => {
195195
pg: Type.String(),
196196
}),
197197
params: Type.Object({
198-
id: Type.RegEx(/\d+/),
198+
id: Type.RegExp(/\d+/),
199199
}),
200200
querystring: Type.Object({
201201
cascade: Type.Optional(Type.String()),

0 commit comments

Comments
 (0)