Add empty secrets.json

This commit is contained in:
Daniel Kluge 2022-05-07 22:18:57 +02:00
parent 23f5987300
commit 0e4a0fadd0
2 changed files with 9 additions and 0 deletions

4
secrets.template.json Normal file
View File

@ -0,0 +1,4 @@
{
"clientId": "",
"clientSecret": ""
}

View File

@ -5,6 +5,11 @@ import fetch from "node-fetch";
import { writeFileSync } from "fs"; import { writeFileSync } from "fs";
import { secretsFile, secrets } from "./common.js"; import { secretsFile, secrets } from "./common.js";
if (!secrets.clientId || !secrets.clientSecret) {
console.error("No client credentials token found. Please run 'npm run token' first.");
process.exit(1);
}
const app = express() const app = express()
app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json()); app.use(bodyParser.json());