4
4
Controller ,
5
5
Delete ,
6
6
Get ,
7
- HttpStatusCodeLiteral ,
8
7
Post ,
9
8
Put ,
10
9
Query ,
@@ -19,8 +18,6 @@ import { StateLockRequest } from '../models/interfaces/StateLockRequest';
19
18
import { GithubService } from '../services/GithubService' ;
20
19
import { StateService } from '../services/StateService' ;
21
20
22
- type HeaderType = { [ key : string ] : string | string [ ] } ;
23
-
24
21
@Route ( '/v1' )
25
22
@Tags ( 'v1' )
26
23
export class ControllerV1 extends Controller {
@@ -38,7 +35,7 @@ export class ControllerV1 extends Controller {
38
35
public async getState (
39
36
@Request ( ) request : HttpRequest ,
40
37
@Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 , any > ,
41
- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , any , HeaderType > > {
38
+ ) : Promise < any > {
42
39
try {
43
40
const identity = await this . githubService . getIdentity ( request ) ;
44
41
const state = await this . stateService . getState ( identity ) ;
@@ -59,7 +56,7 @@ export class ControllerV1 extends Controller {
59
56
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
60
57
@Body ( ) state : any ,
61
58
@Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 | 409 , void > ,
62
- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , void , HeaderType > > {
59
+ ) : Promise < void > {
63
60
try {
64
61
const stateLockRequest = await this . stateService . getRequest ( id ) ;
65
62
const identity = await this . githubService . getIdentity ( request , stateLockRequest ) ;
@@ -79,7 +76,7 @@ export class ControllerV1 extends Controller {
79
76
@Request ( ) request : HttpRequest ,
80
77
@Body ( ) lockRequest : StateLockRequest ,
81
78
@Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 | 409 , boolean > ,
82
- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , boolean , HeaderType > > {
79
+ ) : Promise < boolean > {
83
80
try {
84
81
const stateLockRequest = await this . stateService . saveRequest ( lockRequest ) ;
85
82
const identity = await this . githubService . getIdentity ( request , stateLockRequest ) ;
@@ -99,7 +96,7 @@ export class ControllerV1 extends Controller {
99
96
@Request ( ) request : HttpRequest ,
100
97
@Body ( ) lockRequest : StateLockRequest ,
101
98
@Res ( ) res : TsoaResponse < 200 | 400 | 401 | 404 | 409 , boolean > ,
102
- ) : Promise < TsoaResponse < HttpStatusCodeLiteral , boolean , HeaderType > > {
99
+ ) : Promise < boolean > {
103
100
try {
104
101
const stateLockRequest = await this . stateService . getRequest ( lockRequest . ID ) ;
105
102
const identity = await this . githubService . getIdentity ( request , stateLockRequest ) ;
0 commit comments