Skip to content

Commit

Permalink
Try handling key string
Browse files Browse the repository at this point in the history
  • Loading branch information
jchaselubitz committed Dec 13, 2023
1 parent 35a85db commit 49fee6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pages/api/auth/next-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const options: AuthOptions = {
TextBody: `Sign in to your account: ${url}`,
HtmlBody: `<html><body><p>Sign in to your account:</p><p><a href="${url}">${url}</a></p></body></html>`,
});
console.log('result', result);
// console.log('result', result);
if (result.ErrorCode) {
throw new Error('here', result.Message);
}
Expand Down
5 changes: 2 additions & 3 deletions pages/api/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const gcpCredentials = {
type: 'service_account',
project_id: process.env.NEXT_PUBLIC_GOOGLE_CLOUD_PROJECT_ID,
private_key_id: process.env.NEXT_PUBLIC_GCP_KEY_ID,
private_key: process.env.NEXT_PUBLIC_GCP_PRIVATE_KEY,
private_key: process.env.NEXT_PUBLIC_GCP_PRIVATE_KEY?.replace(/\\n/g, '\n'),
client_email: '[email protected]',
client_id: '108640420626649045093',
auth_uri: 'https://accounts.google.com/o/oauth2/auth',
Expand Down Expand Up @@ -72,8 +72,7 @@ const handler = nextConnect<NextApiRequestWithFile, NextApiResponse>()

try {
blobStream.on('error', (err) => {
console.error(err);
return res.status(500).json({ error: 'Error uploading to Google Cloud Storage' });
return res.status(500).json({ error: 'Error uploading to Google Cloud Storage', err });
});

blobStream.on('finish', () => {
Expand Down

0 comments on commit 49fee6d

Please sign in to comment.