Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secrets: read youtube api key from secrets #16

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add comment
  • Loading branch information
taraspos committed Nov 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f5b80a6b6435095aadd61e9d8adf1fd0a1aeba7f
1 change: 1 addition & 0 deletions utils/general.ts
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ export const filterTextForXSS = (text: string): string => {
};

export const getFromSecretOrEnv = (name: string): string => {
// https://docs.aws.amazon.com/amplify/latest/userguide/environment-secrets.html#access-environment-secrets
const configVars = process.env.secrets ? JSON.parse(process.env.secrets) : process.env;
return configVars[name]
};