File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,17 @@ export default class OBPClientService {
6363 private oauthConfig : OAuthConfig
6464 private clientConfig : APIClientConfig
6565 constructor ( ) {
66+ if ( ! process . env . VITE_OBP_CONSUMER_KEY ) throw new Error ( 'VITE_OBP_CONSUMER_KEY is not set' )
67+ if ( ! process . env . VITE_OBP_CONSUMER_SECRET ) throw new Error ( 'VITE_OBP_CONSUMER_SECRET is not set' )
68+ if ( ! process . env . VITE_OBP_REDIRECT_URL ) throw new Error ( 'VITE_OBP_REDIRECT_URL is not set' )
69+ if ( ! process . env . VITE_OBP_API_HOST ) throw new Error ( 'VITE_OBP_API_HOST is not set' )
6670 this . oauthConfig = {
67- consumerKey : process . env . VITE_OBP_CONSUMER_KEY ,
68- consumerSecret : process . env . VITE_OBP_CONSUMER_SECRET ,
69- redirectUrl : process . env . VITE_OBP_REDIRECT_URL
71+ consumerKey : process . env . VITE_OBP_CONSUMER_KEY ! ,
72+ consumerSecret : process . env . VITE_OBP_CONSUMER_SECRET ! ,
73+ redirectUrl : process . env . VITE_OBP_REDIRECT_URL !
7074 }
7175 this . clientConfig = {
72- baseUri : process . env . VITE_OBP_API_HOST ,
76+ baseUri : process . env . VITE_OBP_API_HOST ! ,
7377 version : ( process . env . VITE_OBP_API_VERSION ?? DEFAULT_OBP_API_VERSION ) as Version ,
7478 oauthConfig : this . oauthConfig
7579 }
You can’t perform that action at this time.
0 commit comments