Skip to content

Commit

Permalink
chore: use process.env.SPREADSHEET_ID instead of a hardcoded string
Browse files Browse the repository at this point in the history
  • Loading branch information
apklinker committed May 20, 2021
1 parent a83c10e commit e67d655
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/database/database.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { GoogleSpreadsheet, GoogleSpreadsheetWorksheet } from 'google-spreadsheet';

export const database = {
qualFileId: '1ChOEjl5l_Uh5dTd_fRjGJt8z7bFNNOwPlzgRnhOLgTY',

async open(): Promise<GoogleSpreadsheet> {
const document = new GoogleSpreadsheet(this.qualFileId);
const document = new GoogleSpreadsheet(process.env.SPREADSHEET_ID);
await document.useServiceAccountAuth({
client_email: process.env.GOOGLE_SERVICE_ACCOUNT_EMAIL ?? '',
private_key: process.env.GOOGLE_PRIVATE_KEY ?? '',
Expand Down

0 comments on commit e67d655

Please sign in to comment.