mirror of
https://github.com/logto-io/logto.git
synced 2025-03-10 22:22:45 -05:00
Update instance to readonly const
This commit is contained in:
parent
5de0563641
commit
5ec1f6719d
2 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ export type OidcModelInstanceDBEntry = {
|
|||
grantId?: string;
|
||||
};
|
||||
|
||||
export const OidcModelInstances = {
|
||||
export const OidcModelInstances = Object.freeze({
|
||||
table: 'oidc_model_instances',
|
||||
fields: {
|
||||
modelName: 'model_name',
|
||||
|
@ -23,4 +23,4 @@ export const OidcModelInstances = {
|
|||
uid: 'uid',
|
||||
grantId: 'grant_id',
|
||||
},
|
||||
};
|
||||
} as const);
|
||||
|
|
|
@ -96,12 +96,12 @@ const generate = async () => {
|
|||
),
|
||||
'};',
|
||||
'',
|
||||
`export const ${camelcase(name, { pascalCase: true })} = {`,
|
||||
`export const ${camelcase(name, { pascalCase: true })} = Object.freeze({`,
|
||||
` table: '${name}',`,
|
||||
` fields: {`,
|
||||
...fields.map(({ name }) => ` ${camelcase(name)}: '${name}',`),
|
||||
` },`,
|
||||
`};`,
|
||||
`} as const);`,
|
||||
].join('\n')
|
||||
)
|
||||
.join('\n') +
|
||||
|
|
Loading…
Add table
Reference in a new issue