feat: change payment method endpoint

This commit is contained in:
Mo
2023-05-05 08:27:06 -05:00
parent 0a0b8aafaf
commit f5ac8ac5e9
2 changed files with 14 additions and 1 deletions
@@ -30,6 +30,16 @@ export class PaymentsControllerV2 extends BaseHttpController {
await this.httpService.callPaymentsServer(request, response, 'api/subscriptions/deltas/apply', request.body)
}
@httpPost('/subscriptions/change-payment-method', TYPES.SubscriptionTokenAuthMiddleware)
async changePaymentMethod(request: Request, response: Response): Promise<void> {
await this.httpService.callPaymentsServer(
request,
response,
'api/subscriptions/change-payment-method',
request.body,
)
}
@httpGet('/subscriptions/:subscriptionId', TYPES.SubscriptionTokenAuthMiddleware)
async getSubscription(request: Request, response: Response): Promise<void> {
await this.httpService.callPaymentsServer(