mirror of
https://github.com/standardnotes/server
synced 2026-07-12 20:01:09 -04:00
feat: change payment method endpoint
This commit is contained in:
@@ -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(
|
||||
|
||||
+4
-1
@@ -65,7 +65,10 @@ export class CreateOfflineSubscriptionToken implements UseCaseInterface {
|
||||
|
||||
await this.domainEventPublisher.publish(
|
||||
this.domainEventFactory.createEmailRequestedEvent({
|
||||
body: getBody(dto.userEmail, `https://standardnotes.com/dashboard/offline?subscription_token=${token}`),
|
||||
body: getBody(
|
||||
dto.userEmail,
|
||||
`https://standardnotes.com/dashboard/offline?subscription_token=${token}&email=${dto.userEmail}`,
|
||||
),
|
||||
level: EmailLevel.LEVELS.System,
|
||||
subject: getSubject(),
|
||||
messageIdentifier: 'OFFLINE_SUBSCRIPTION_ACCESS',
|
||||
|
||||
Reference in New Issue
Block a user