Skip to content

Commit fcf476d

Browse files
author
Kerwin
committed
fix: can't save accesstoken (Close #79)
1 parent b3796aa commit fcf476d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ router.post('/setting-base', rootAuth, async (req, res) => {
611611

612612
if (apiModel === 'ChatGPTAPI' && !isNotEmptyString(apiKey))
613613
throw new Error('Missing OPENAI_API_KEY environment variable.')
614-
else if (!isNotEmptyString(accessToken))
614+
else if (apiModel === 'ChatGPTUnofficialProxyAPI' && !isNotEmptyString(accessToken))
615615
throw new Error('Missing OPENAI_ACCESS_TOKEN environment variable.')
616616

617617
const thisConfig = await getOriginConfig()

0 commit comments

Comments
 (0)