From 2c36f75dd9a89d55d305f9e2e26f9a3083cb3bc1 Mon Sep 17 00:00:00 2001 From: Sam Poder <39828164+sampoder@users.noreply.github.com> Date: Tue, 1 Feb 2022 18:16:50 +0800 Subject: [PATCH] Switch to Vercel's new Environment Variables system --- pages/api/channels/dogs.js | 2 +- vercel.json | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/api/channels/dogs.js b/pages/api/channels/dogs.js index 38877489..6acb5490 100644 --- a/pages/api/channels/dogs.js +++ b/pages/api/channels/dogs.js @@ -1,6 +1,6 @@ export default async function handler(req, res) { // returns a url_private for the latest image posted in #dogs - const fileList = await fetch(`https://slack.com/api/files.list?token=${process.env.SCRAPPY_TOKEN}&channel=CDJV1CXC2&count=1`) + const fileList = await fetch(`https://slack.com/api/files.list?token=${process.env.SLACK_BOT_TOKEN}&channel=CDJV1CXC2&count=1`) .then(r => r.json()) .catch(err => res.status(400).send(err)) diff --git a/vercel.json b/vercel.json index 67c0c24d..ec5d8ab0 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,3 @@ { - "env": { - "SLACK_BOT_TOKEN": "@slack-bot-token-production-8avf" - }, "github": { "silent": true } }