44 Controller ,
55 Delete ,
66 Get ,
7- HttpStatusCodeLiteral ,
87 Post ,
98 Put ,
109 Query ,
@@ -19,8 +18,6 @@ import { StateLockRequest } from '../models/interfaces/StateLockRequest';
1918import { GithubService } from '../services/GithubService' ;
2019import { StateService } from '../services/StateService' ;
2120
22- type HeaderType = { [ key : string ] : string | string [ ] } ;
23-
2421@Route ( '/v1' )
2522@Tags ( 'v1' )
2623export class ControllerV1 extends Controller {
@@ -38,7 +35,7 @@ export class ControllerV1 extends Controller {
3835 public async getState (
3936 @Request ( ) request : HttpRequest ,
4037 @Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 , any > ,
41- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , any , HeaderType > > {
38+ ) : Promise < any > {
4239 try {
4340 const identity = await this . githubService . getIdentity ( request ) ;
4441 const state = await this . stateService . getState ( identity ) ;
@@ -59,7 +56,7 @@ export class ControllerV1 extends Controller {
5956 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
6057 @Body ( ) state : any ,
6158 @Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 | 409 , void > ,
62- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , void , HeaderType > > {
59+ ) : Promise < void > {
6360 try {
6461 const stateLockRequest = await this . stateService . getRequest ( id ) ;
6562 const identity = await this . githubService . getIdentity ( request , stateLockRequest ) ;
@@ -79,7 +76,7 @@ export class ControllerV1 extends Controller {
7976 @Request ( ) request : HttpRequest ,
8077 @Body ( ) lockRequest : StateLockRequest ,
8178 @Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 | 409 , boolean > ,
82- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , boolean , HeaderType > > {
79+ ) : Promise < boolean > {
8380 try {
8481 const stateLockRequest = await this . stateService . saveRequest ( lockRequest ) ;
8582 const identity = await this . githubService . getIdentity ( request , stateLockRequest ) ;
@@ -99,7 +96,7 @@ export class ControllerV1 extends Controller {
9996 @Request ( ) request : HttpRequest ,
10097 @Body ( ) lockRequest : StateLockRequest ,
10198 @Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 | 409 , boolean > ,
102- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , boolean , HeaderType > > {
99+ ) : Promise < boolean > {
103100 try {
104101 const stateLockRequest = await this . stateService . getRequest ( lockRequest . ID ) ;
105102 const identity = await this . githubService . getIdentity ( request , stateLockRequest ) ;
0 commit comments