Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const fs = require('fs-extra')
const axios = require('axios')
const curlirize = require('axios-curlirize').default
// get some nice debugging output
// curlirize(axios)
require('dotenv').config()
const googleSheetIds = {
2017: '15AgxGT87Qc02IqPV46Uc0u9Z_ChfAjZQaj3qS2VNF8g',
2019: '17SfLTsqLaoBG8WE5vKHmBY_J6Iz1IFKThm_wAqsHZdg',
}
const requestSheet = async (id, sheet) => {
try {
const response = await axios.get(
`https://sheets.googleapis.com/v4/spreadsheets/${id}/values/${sheet}?key=${
process.env.GOOGLE_API_KEY