File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import {CheckoutSession} from '../model/checkout-session.model';
5
5
import { AngularFireAuth } from '@angular/fire/auth' ;
6
6
import { AngularFirestore } from '@angular/fire/firestore' ;
7
7
import { filter , first } from 'rxjs/operators' ;
8
+ import { environment } from '../../environments/environment' ;
8
9
9
10
declare const Stripe ;
10
11
@@ -28,7 +29,7 @@ export class CheckoutService {
28
29
29
30
const headers = new HttpHeaders ( ) . set ( "Authorization" , this . jwtAuth ) ;
30
31
31
- return this . http . post < CheckoutSession > ( "/api/checkout" , {
32
+ return this . http . post < CheckoutSession > ( environment . api . baseUrl + "/api/checkout" , {
32
33
courseId,
33
34
callbackUrl : this . buildCallbackUrl ( )
34
35
} , { headers} )
@@ -38,7 +39,7 @@ export class CheckoutService {
38
39
39
40
const headers = new HttpHeaders ( ) . set ( "Authorization" , this . jwtAuth ) ;
40
41
41
- return this . http . post < CheckoutSession > ( "/api/checkout" , {
42
+ return this . http . post < CheckoutSession > ( environment . api . baseUrl + "/api/checkout" , {
42
43
pricingPlanId,
43
44
callbackUrl : this . buildCallbackUrl ( )
44
45
} , { headers} )
Original file line number Diff line number Diff line change 1
1
export const environment = {
2
2
production : true ,
3
3
firebase : {
4
-
4
+ apiKey : "AIzaSyBC9AIbgFfJQPKHBgGg7xULHNWjlnW-3vs" ,
5
+ authDomain : "stripe-course-recording.firebaseapp.com" ,
6
+ databaseURL : "https://stripe-course-recording.firebaseio.com" ,
7
+ projectId : "stripe-course-recording" ,
8
+ storageBucket : "stripe-course-recording.appspot.com" ,
9
+ messagingSenderId : "909700347297" ,
10
+ appId : "1:909700347297:web:0e9e7105baf123acdd87e0"
5
11
} ,
6
12
api : {
7
- baseUrl : ""
13
+ baseUrl : "https://stripe-course-recording.appspot.com "
8
14
}
9
15
} ;
You can’t perform that action at this time.
0 commit comments