fix: 提高Api兼容性

This commit is contained in:
手瓜一十雪 2024-06-03 17:09:23 +08:00
parent 9e670e2736
commit 3280952931
2 changed files with 4 additions and 4 deletions

View File

@ -9,10 +9,10 @@ const SchemaData = {
type: 'object', type: 'object',
properties: { properties: {
flag: { type: 'string' }, flag: { type: 'string' },
approve: { type: 'boolean' }, approve: { type: ['string', 'boolean'] },
reason: { type: 'string' } reason: { type: 'string' }
}, },
required: ['flag'] required: ['flag'],
} as const satisfies JSONSchema; } as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>; type Payload = FromSchema<typeof SchemaData>;

View File

@ -8,10 +8,10 @@ const SchemaData = {
type: 'object', type: 'object',
properties: { properties: {
flag: { type: 'string' }, flag: { type: 'string' },
approve: { type: 'boolean' }, approve: { type: ['string', 'boolean'] },
remark: { type: 'string' } remark: { type: 'string' }
}, },
required: ['flag','approve'] required: ['flag', 'approve']
} as const satisfies JSONSchema; } as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>; type Payload = FromSchema<typeof SchemaData>;