Skip to content

Commit

Permalink
Renamed references to old env file and ran tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedgemon4 committed Jan 17, 2024
1 parent 5f1152c commit fffe0b5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.env*
cypress.env.json

# vercel
Expand Down
2 changes: 1 addition & 1 deletion src/components/GoogleSigninButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function GoogleSignInButton() {
function signInWithGoogle(e: React.MouseEvent<HTMLButtonElement>) {
e.preventDefault()
signIn('google', {
callbackUrl: `${ process.env.appBaseUrl }/dashboard`,
callbackUrl: `${ process.env.BASE_URL }/dashboard`,
}).catch((err) => {
logger.error('An unexpected error occurred while log in with Google: ' + err.error)
})
Expand Down
6 changes: 2 additions & 4 deletions src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const authOptions: NextAuthOptions = {
secret: process.env.NEXT_PUBLIC_NEXTAUTH_SECRET,
providers: [
GoogleProvider({
clientId: process.env.googleClientId as string,
clientSecret: process.env.googleClientSecret as string,
clientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID as string,
clientSecret: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET as string,
profile(profile) {
return {
id: profile.sub,
Expand Down Expand Up @@ -82,8 +82,6 @@ export const authOptions: NextAuthOptions = {
},
}

console.log('Goodbye')

function passwordMatch(enteredPassword: string, password: string): Promise<boolean> {
return compare(enteredPassword, password)
}
12 changes: 6 additions & 6 deletions src/utils/sendVideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ export default async function sendVideo(rawVideo: File, owner: User): Promise<Vi
const rawVideoBuffer = await rawVideo.arrayBuffer()

const client = new S3Client({
region: process.env.awsUploadRegion,
region: process.env.AWS_UPLOAD_REGION,
credentials: {
accessKeyId: process.env.awsAccessKeyId as string,
secretAccessKey: process.env.awsSecretAccessKey as string,
sessionToken: process.env.awsSessionToken as string,
accessKeyId: process.env.AWS_ACCESS_KEY_ID as string,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY as string,
sessionToken: process.env.AWS_SESSION_TOKEN as string,
},
})

const uploadS3 = new Upload({
client: client,
params: {
Bucket: process.env.awsUploadBucket as string,
Bucket: process.env.AWS_UPLOAD_BUCKET as string,
Key: s3Key,
Body: Readable.from(Buffer.from(rawVideoBuffer)),
},
Expand Down Expand Up @@ -99,7 +99,7 @@ export default async function sendVideo(rawVideo: File, owner: User): Promise<Vi
const uploadJson = new Upload({
client: client,
params: {
Bucket: process.env.awsUploadBucket as string,
Bucket: process.env.AWS_UPLOAD_BUCKET as string,
Key: await makeS3Key(newVideo, 'json'),
Body: metadataFile,
},
Expand Down

0 comments on commit fffe0b5

Please sign in to comment.