@@ -5,7 +5,6 @@ import { BaseUseCase } from '../domain/usecase/base.usecase';
5
5
import { SuccessResponse } from '../frameworks/shared/responses/success.response' ;
6
6
import { IContext } from '../frameworks/shared/interceptors/context.interceptor' ;
7
7
import { ExtendedSerializer } from '../frameworks/shared/decorators/serializer.decorator' ;
8
- import { Authentication } from '../frameworks/shared/decorators/authentication.decorator' ;
9
8
import { Authorization } from '../frameworks/shared/decorators/authorization.decorator' ;
10
9
import { Context } from '../frameworks/shared/decorators/context.decorator' ;
11
10
import { UseList } from '../frameworks/shared/decorators/uselist.decorator' ;
@@ -53,7 +52,6 @@ export function MessagingControllerFactory<
53
52
54
53
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'getAudit' ) )
55
54
@ExtendedSerializer ( getSerializer )
56
- @Authentication ( true )
57
55
@Authorization ( `audit:read@auth` )
58
56
async getAudit ( data : { id : string } ) {
59
57
const result = await this . _usecase . getAudit ( data . id ) ;
@@ -67,7 +65,6 @@ export function MessagingControllerFactory<
67
65
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'getAudits' ) )
68
66
@UseList ( FilterPaginationAuditQueryValidator )
69
67
@ExtendedSerializer ( ListAuditSerializer )
70
- @Authentication ( true )
71
68
@Authorization ( `audit:read@auth` )
72
69
async getAudits ( @Context ( ) ctx : IContext ) {
73
70
const { result, meta } = await this . _usecase . getAudits ( ctx ) ;
@@ -76,7 +73,6 @@ export function MessagingControllerFactory<
76
73
}
77
74
78
75
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'listDropdown' ) )
79
- @Authentication ( true )
80
76
@Authorization ( `${ rolePrefix } :read@auth` )
81
77
async listDropdown ( @Context ( ) ctx : IContext ) {
82
78
const result = await this . _usecase . listDropdown ( ctx ) ;
@@ -87,7 +83,6 @@ export function MessagingControllerFactory<
87
83
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'listPagination' ) )
88
84
@UseList ( listPaginationQuery )
89
85
@ExtendedSerializer ( listSerializer )
90
- @Authentication ( true )
91
86
@Authorization ( `${ rolePrefix } :read@auth` )
92
87
async listPagination ( @Context ( ) ctx : IContext ) {
93
88
const { result, meta } = await this . _usecase . listPagination ( ctx ) ;
@@ -98,7 +93,6 @@ export function MessagingControllerFactory<
98
93
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'listCursor' ) )
99
94
@UseList ( listCursorQuery )
100
95
@ExtendedSerializer ( listSerializer )
101
- @Authentication ( true )
102
96
@Authorization ( `${ rolePrefix } :read@auth` )
103
97
async listCursor ( @Context ( ) ctx : IContext ) {
104
98
const { meta, result } = await this . _usecase . listCursor ( ctx ) ;
@@ -108,7 +102,6 @@ export function MessagingControllerFactory<
108
102
109
103
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'upsert' ) )
110
104
@ExtendedSerializer ( upsertSerializer )
111
- @Authentication ( true )
112
105
@Authorization ( `${ rolePrefix } :create@auth` , `${ rolePrefix } :update@auth` )
113
106
async upsert ( @Context ( ) ctx : IContext , data : UpsertBody ) {
114
107
const result = await this . _usecase . upsert ( ctx , data ) ;
@@ -118,7 +111,6 @@ export function MessagingControllerFactory<
118
111
119
112
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'get' ) )
120
113
@ExtendedSerializer ( getSerializer )
121
- @Authentication ( true )
122
114
@Authorization ( `${ rolePrefix } :read@auth` )
123
115
async get ( @Context ( ) ctx : IContext , data : { id : string } ) {
124
116
const result = await this . _usecase . getById ( ctx , data . id ) ;
@@ -128,7 +120,6 @@ export function MessagingControllerFactory<
128
120
129
121
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'list' ) )
130
122
@ExtendedSerializer ( listSerializer )
131
- @Authentication ( true )
132
123
@Authorization ( `${ rolePrefix } :read@auth` )
133
124
async list ( @Context ( ) ctx : IContext , _data : any ) {
134
125
const result = await this . _usecase . listPagination ( ctx ) ;
@@ -138,7 +129,6 @@ export function MessagingControllerFactory<
138
129
139
130
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'create' ) )
140
131
@ExtendedSerializer ( createSerializer )
141
- @Authentication ( true )
142
132
@Authorization ( `${ rolePrefix } :create@auth` )
143
133
async create ( @Context ( ) ctx : IContext , data : CreateBody ) {
144
134
const result = await this . _usecase . create ( ctx , data ) ;
@@ -148,7 +138,6 @@ export function MessagingControllerFactory<
148
138
149
139
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'update' ) )
150
140
@ExtendedSerializer ( updateSerializer )
151
- @Authentication ( true )
152
141
@Authorization ( `${ rolePrefix } :update@auth` )
153
142
async update ( @Context ( ) ctx : IContext , data : { id : string } & UpdateBody ) {
154
143
const { id, ...body } = data ;
@@ -159,7 +148,6 @@ export function MessagingControllerFactory<
159
148
160
149
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'delete' ) )
161
150
@ExtendedSerializer ( deleteSerializer )
162
- @Authentication ( true )
163
151
@Authorization ( `${ rolePrefix } :delete@auth` )
164
152
async delete ( @Context ( ) ctx : IContext , data : { id : string } ) {
165
153
const result = await this . _usecase . delete ( ctx , data . id ) ;
@@ -169,7 +157,6 @@ export function MessagingControllerFactory<
169
157
170
158
@MessagePattern ( SubjectFactory . buildSubject ( messageType , 'deleteBatch' ) )
171
159
@ExtendedSerializer ( deleteSerializer )
172
- @Authentication ( true )
173
160
@Authorization ( `${ rolePrefix } :delete@auth` )
174
161
async deleteBatch ( @Context ( ) ctx : IContext , data : DeleteBatchBody ) {
175
162
const result = await this . _usecase . deleteBatch ( ctx , data ) ;
0 commit comments