Skip to content

Commit 39b114f

Browse files
authored
πŸ› fix env prefix emtpy (#8)
1 parent 92117e3 commit 39b114f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

β€Žsrc/infra/external/searchGoogle.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class GoogleSearch {
2222
constructor(env: Env) {
2323
this.cx = env.GOOGLE_SEARCH_ENAGINE_ID
2424
this.key = env.GOOGLE_SEARCH_KEY
25-
this.searchApi = env.SEARCH_GOOGLE_API ?? GoogleSearch.GOOGLE_SEARCH_API
25+
this.searchApi = env.SEARCH_GOOGLE_API.length > 0 ? env.SEARCH_GOOGLE_API : GoogleSearch.GOOGLE_SEARCH_API
2626
}
2727

2828
async search(params: string) {

β€Žsrc/utils/authLogin/authGoogle.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GoogleAuth {
4949
this.clientId = env.GOOGLE_CLIENT_ID_TEXT
5050
this.clientSecret = env.GOOGLE_CLIENT_SECRET_TEXT
5151
}
52-
this.authPrefix = env.GOOGLE_AUTH_PREFIX ?? GoogleAuth.GOOGLE_AUTH_PREFIX
52+
this.authPrefix = env.GOOGLE_AUTH_PREFIX.length > 0 ? env.GOOGLE_AUTH_PREFIX : GoogleAuth.GOOGLE_AUTH_PREFIX
5353
}
5454

5555
verifyGoogleToken = async (idToken: string): Promise<tokenInfo> => {

0 commit comments

Comments
Β (0)