0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

fix(core): fix dev tenant migration data guard (#5201)

This commit is contained in:
Xiao Yijun 2024-01-05 14:06:29 +08:00 committed by GitHub
parent 94943cb3c3
commit 5538946a9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,6 @@
import type { ZodType } from 'zod';
import { z } from 'zod';
import { TenantTag } from './tenant.js';
/**
* Logto OIDC signing key types, used mainly in REST API routes.
*/
@ -54,7 +52,11 @@ export const adminConsoleDataGuard = z.object({
developmentTenantMigrationNotification: z
.object({
isPaidTenant: z.boolean(),
tag: z.nativeEnum(TenantTag),
/**
* Tag is used to store the original tenant tag before dev tenant migration.
* This field is only used for DB rollback and because the `TenantTag` may change, so we don't guard it as the `TenantTag` type.
*/
tag: z.string(),
readAt: z.number().optional(),
})
.optional(),