Skip to content

Commit

Permalink
feat: update to sharepoint env var
Browse files Browse the repository at this point in the history
  • Loading branch information
PAYNEA03 committed Jul 31, 2023
1 parent a1fc771 commit f35ccb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pages/api/content/sharepoint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import mime from 'mime-types';


// configure your node options (only once in your application)
const buffer = readFileSync(process.env.SHAREPOINT_PRIVATE_KEY_FILE);
let buffer = process.env.SHAREPOINT_PRIVATE_KEY;
if (!buffer) {
const privateKeyPath = process.env.SHAREPOINT_PRIVATE_KEY_FILE;
buffer = readFileSync(privateKeyPath);
}

const config = {
auth: {
Expand Down

0 comments on commit f35ccb0

Please sign in to comment.