mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-09 07:54:26 +01:00
Fix invalid SerpApi secret id
This commit is contained in:
parent
211722d67b
commit
57165cbe48
@ -1,5 +1,5 @@
|
|||||||
const fetch = require('node-fetch').default;
|
const fetch = require('node-fetch').default;
|
||||||
const { readSecret } = require('./secrets');
|
const { readSecret, SECRET_KEYS } = require('./secrets');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the SerpApi endpoints.
|
* Registers the SerpApi endpoints.
|
||||||
@ -9,7 +9,7 @@ const { readSecret } = require('./secrets');
|
|||||||
function registerEndpoints(app, jsonParser) {
|
function registerEndpoints(app, jsonParser) {
|
||||||
app.post('/api/serpapi/search', jsonParser, async (request, response) => {
|
app.post('/api/serpapi/search', jsonParser, async (request, response) => {
|
||||||
try {
|
try {
|
||||||
const key = readSecret('serpapi_key');
|
const key = readSecret(SECRET_KEYS.SERPAPI);
|
||||||
|
|
||||||
if (!key) {
|
if (!key) {
|
||||||
console.log('No SerpApi key found');
|
console.log('No SerpApi key found');
|
||||||
|
Loading…
Reference in New Issue
Block a user