1
- import { Static , Type } from "@sinclair/typebox" ;
1
+ import { Type , type Static } from "@sinclair/typebox" ;
2
2
import { buildJWT } from "@thirdweb-dev/auth" ;
3
3
import { LocalWallet } from "@thirdweb-dev/wallets" ;
4
- import { FastifyInstance } from "fastify" ;
4
+ import type { FastifyInstance } from "fastify" ;
5
5
import { StatusCodes } from "http-status-codes" ;
6
6
import { updateConfiguration } from "../../../../db/configuration/updateConfiguration" ;
7
7
import { createToken } from "../../../../db/tokens/createToken" ;
@@ -16,12 +16,10 @@ const requestBodySchema = Type.Object({
16
16
} ) ;
17
17
18
18
const responseBodySchema = Type . Object ( {
19
- result : Type . Composite ( [
20
- AccessTokenSchema ,
21
- Type . Object ( {
22
- accessToken : Type . String ( ) ,
23
- } ) ,
24
- ] ) ,
19
+ result : Type . Object ( {
20
+ ...AccessTokenSchema . properties ,
21
+ accessToken : Type . String ( ) ,
22
+ } ) ,
25
23
} ) ;
26
24
27
25
export async function createAccessToken ( fastify : FastifyInstance ) {
@@ -35,7 +33,7 @@ export async function createAccessToken(fastify: FastifyInstance) {
35
33
summary : "Create a new access token" ,
36
34
description : "Create a new access token" ,
37
35
tags : [ "Access Tokens" ] ,
38
- operationId : "create " ,
36
+ operationId : "createAccessToken " ,
39
37
body : requestBodySchema ,
40
38
response : {
41
39
...standardResponseSchema ,
0 commit comments