Commit 2894023c authored by nanahira's avatar nanahira

add constructor in config schema

parent d19280df
...@@ -23,6 +23,7 @@ export const s3Schema = Schema.object({ ...@@ -23,6 +23,7 @@ export const s3Schema = Schema.object({
@RegisterSchema({ description: '发送卡组的置' }) @RegisterSchema({ description: '发送卡组的置' })
export class DeckFetchConfig { export class DeckFetchConfig {
constructor(config: Partial<DeckFetchConfig>) {}
@DefineSchema({ description: 'S3 配置', type: s3Schema }) @DefineSchema({ description: 'S3 配置', type: s3Schema })
s3: S3ClientConfig; s3: S3ClientConfig;
...@@ -64,6 +65,7 @@ export class DeckFetchConfig { ...@@ -64,6 +65,7 @@ export class DeckFetchConfig {
@RegisterSchema({ description: '比赛过程的设置' }) @RegisterSchema({ description: '比赛过程的设置' })
export class TournamentConfig { export class TournamentConfig {
constructor(config: Partial<TournamentConfig>) {}
@DefineSchema({ @DefineSchema({
description: '服务器 API 连接后台,不带任何路径和尾随斜杠', description: '服务器 API 连接后台,不带任何路径和尾随斜杠',
}) })
...@@ -122,6 +124,7 @@ export class TournamentConfig { ...@@ -122,6 +124,7 @@ export class TournamentConfig {
@RegisterSchema() @RegisterSchema()
export class YGOTournamentPluginConfig { export class YGOTournamentPluginConfig {
constructor(config: Partial<YGOTournamentPluginConfig>) {}
@DefineSchema({ @DefineSchema({
type: 'object', type: 'object',
description: '裁判接口作用域', description: '裁判接口作用域',
......
...@@ -17,7 +17,7 @@ export interface RequestPresigningArgumentsWithHeaders ...@@ -17,7 +17,7 @@ export interface RequestPresigningArgumentsWithHeaders
export const getSignedUrl = async < export const getSignedUrl = async <
InputTypesUnion extends Record<string, any>, InputTypesUnion extends Record<string, any>,
InputType extends InputTypesUnion, InputType extends InputTypesUnion,
OutputType extends MetadataBearer = MetadataBearer OutputType extends MetadataBearer = MetadataBearer,
>( >(
client: Client<any, InputTypesUnion, MetadataBearer, any>, client: Client<any, InputTypesUnion, MetadataBearer, any>,
command: Command<InputType, OutputType, any, InputTypesUnion, MetadataBearer>, command: Command<InputType, OutputType, any, InputTypesUnion, MetadataBearer>,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment