@@ -76,10 +76,7 @@ export class OrganizationServiceAPI implements ServiceImpl<typeof OrganizationSe
76
76
return response ;
77
77
}
78
78
79
- async updateOrganization (
80
- req : UpdateOrganizationRequest ,
81
- _ : HandlerContext ,
82
- ) : Promise < UpdateOrganizationResponse > {
79
+ async updateOrganization ( req : UpdateOrganizationRequest , _ : HandlerContext ) : Promise < UpdateOrganizationResponse > {
83
80
if ( ! uuidValidate ( req . organizationId ) ) {
84
81
throw new ConnectError ( "organizationId is required" , Code . InvalidArgument ) ;
85
82
}
@@ -95,10 +92,7 @@ export class OrganizationServiceAPI implements ServiceImpl<typeof OrganizationSe
95
92
} ) ;
96
93
}
97
94
98
- async listOrganizations (
99
- req : ListOrganizationsRequest ,
100
- _ : HandlerContext ,
101
- ) : Promise < ListOrganizationsResponse > {
95
+ async listOrganizations ( req : ListOrganizationsRequest , _ : HandlerContext ) : Promise < ListOrganizationsResponse > {
102
96
const orgs = await this . orgService . listOrganizations (
103
97
ctxUserId ( ) ,
104
98
{
@@ -114,10 +108,7 @@ export class OrganizationServiceAPI implements ServiceImpl<typeof OrganizationSe
114
108
return response ;
115
109
}
116
110
117
- async deleteOrganization (
118
- req : DeleteOrganizationRequest ,
119
- _ : HandlerContext ,
120
- ) : Promise < DeleteOrganizationResponse > {
111
+ async deleteOrganization ( req : DeleteOrganizationRequest , _ : HandlerContext ) : Promise < DeleteOrganizationResponse > {
121
112
if ( ! uuidValidate ( req . organizationId ) ) {
122
113
throw new ConnectError ( "organizationId is required" , Code . InvalidArgument ) ;
123
114
}
@@ -259,10 +250,7 @@ export class OrganizationServiceAPI implements ServiceImpl<typeof OrganizationSe
259
250
throw new ConnectError ( "nothing to update" , Code . InvalidArgument ) ;
260
251
}
261
252
262
- const settings = await this . orgService . updateSettings ( ctxUserId ( ) , req . organizationId , {
263
- workspaceSharingDisabled : req . workspaceSharingDisabled ,
264
- defaultWorkspaceImage : req . defaultWorkspaceImage ,
265
- } ) ;
253
+ const settings = await this . orgService . updateSettings ( ctxUserId ( ) , req . organizationId , update ) ;
266
254
return new UpdateOrganizationSettingsResponse ( {
267
255
settings : this . apiConverter . toOrganizationSettings ( settings ) ,
268
256
} ) ;
0 commit comments