File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
components/server/ee/src/workspace Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -2188,19 +2188,8 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
2188
2188
}
2189
2189
2190
2190
async getStripePortalUrlForTeam ( ctx : TraceContext , teamId : string ) : Promise < string > {
2191
- this . checkAndBlockUser ( "getStripePortalUrlForTeam" ) ;
2192
- const team = await this . guardTeamOperation ( teamId , "update" ) ;
2193
- await this . ensureStripeApiIsAllowed ( { team } ) ;
2194
- try {
2195
- const url = await this . stripeService . getPortalUrlForTeam ( team ! ) ;
2196
- return url ;
2197
- } catch ( error ) {
2198
- log . error ( `Failed to get Stripe portal URL for team '${ teamId } '` , error ) ;
2199
- throw new ResponseError (
2200
- ErrorCodes . INTERNAL_SERVER_ERROR ,
2201
- `Failed to get Stripe portal URL for team '${ teamId } '` ,
2202
- ) ;
2203
- }
2191
+ const attributionId : AttributionId = { kind : "team" , teamId : teamId } ;
2192
+ return this . getStripePortalUrl ( ctx , AttributionId . render ( attributionId ) ) ;
2204
2193
}
2205
2194
2206
2195
async getUsageLimitForTeam ( ctx : TraceContext , teamId : string ) : Promise < number | undefined > {
You can’t perform that action at this time.
0 commit comments