✨ redeploy
This commit is contained in:
parent
ed46eddf29
commit
eae6aece6c
@ -34,7 +34,7 @@ export default class StripeController extends ApiController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//init Subscription resource with request body values
|
//init Subscription resource with request body valuess
|
||||||
const subscriptionEntity = Subscription.hydrate<Subscription>(req.body, { strategy: "excludeAll" });
|
const subscriptionEntity = Subscription.hydrate<Subscription>(req.body, { strategy: "excludeAll" });
|
||||||
|
|
||||||
await validateOrReject(subscriptionEntity, { groups: ["createSubscription"], forbidUnknownValues: false });
|
await validateOrReject(subscriptionEntity, { groups: ["createSubscription"], forbidUnknownValues: false });
|
||||||
@ -42,7 +42,6 @@ export default class StripeController extends ApiController {
|
|||||||
const stripeSession = await this.stripeService.createCheckoutSession(subscriptionEntity, frequency);
|
const stripeSession = await this.stripeService.createCheckoutSession(subscriptionEntity, frequency);
|
||||||
|
|
||||||
this.httpCreated(response, stripeSession);
|
this.httpCreated(response, stripeSession);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.httpInternalError(response, error);
|
this.httpInternalError(response, error);
|
||||||
return;
|
return;
|
||||||
@ -70,7 +69,6 @@ export default class StripeController extends ApiController {
|
|||||||
@Get("/api/v1/admin/stripe/:uid/client-portal", [authHandler, ruleHandler])
|
@Get("/api/v1/admin/stripe/:uid/client-portal", [authHandler, ruleHandler])
|
||||||
protected async getClientPortalSession(req: Request, response: Response) {
|
protected async getClientPortalSession(req: Request, response: Response) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const uid = req.params["uid"];
|
const uid = req.params["uid"];
|
||||||
if (!uid) {
|
if (!uid) {
|
||||||
this.httpBadRequest(response, "No uid provided");
|
this.httpBadRequest(response, "No uid provided");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user