1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-29 03:32:04 +03:00

fix: do not ask to regenerate the HTTP API key if this one isn't available yet

This commit is contained in:
louistiti 2022-02-04 14:01:46 +08:00
parent 36b0f68afc
commit d265377a43
No known key found for this signature in database
GPG Key ID: 0A1C3B043E70C77D

View File

@ -49,7 +49,7 @@ const generateHttpApiKey = () => new Promise(async (resolve, reject) => {
export default () => new Promise(async (resolve, reject) => {
try {
if (process.env.LEON_HTTP_API_KEY === '') {
if (!process.env.LEON_HTTP_API_KEY || process.env.LEON_HTTP_API_KEY === '') {
await generateHttpApiKey()
} else if (!process.env.IS_DOCKER) {
const answer = await prompt({