v4.6.6-fix (#676)

This commit is contained in:
Archer
2024-01-02 14:18:51 +08:00
committed by GitHub
parent d645a7406b
commit 2e75851b02
179 changed files with 279 additions and 5964 deletions

View File

@@ -11,7 +11,7 @@ export async function authOpenApiKey({ apikey }: { apikey: string }) {
return Promise.reject(ERROR_ENUM.unAuthApiKey);
}
try {
const openApi = await MongoOpenApi.findOne({ apiKey: apikey });
const openApi = await MongoOpenApi.findOne({ apiKey: apikey.trim() });
if (!openApi) {
return Promise.reject(ERROR_ENUM.unAuthApiKey);
}