eine Version 0_1 hinzugefügt

This commit is contained in:
Claus-Peter Hübner 2022-12-14 23:46:52 +01:00
parent 1124e2ce96
commit 326672905a
2 changed files with 23 additions and 0 deletions

View File

@ -17,6 +17,7 @@ const ERRORTIME = 240000
const ANNOUNCETIME = 30000
enum ApiVersionType {
V0_1 = 'v0_1',
V1_0 = 'v1_0',
V1_1 = 'v1_1',
V2_0 = 'v2_0',

View File

@ -0,0 +1,22 @@
import { Field, ObjectType, Query, Resolver } from 'type-graphql'
import { backendLogger as logger } from '@/server/logger'
@ObjectType()
class GetTestApiResult {
constructor(apiVersion: string) {
this.api = `${apiVersion}`
}
@Field(() => String)
api: string
}
@Resolver()
export class TestResolver {
@Query(() => GetTestApiResult)
async test(): Promise<GetTestApiResult> {
logger.info(`test api 0_1`)
return new GetTestApiResult("0_1")
}
}