fix: package plus request (#4492)

* fix plus request (#4476)

* perf: package plus request

* perf: plus request fix

* fix: doc

---------

Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
Archer
2025-04-09 23:44:14 +08:00
committed by GitHub
parent e4629a5c8c
commit c02864facc
21 changed files with 231 additions and 363 deletions

View File

@@ -1,7 +1,6 @@
import { ERROR_ENUM } from '@fastgpt/global/common/error/errorCode';
import { updateApiKeyUsedTime } from './tools';
import { MongoOpenApi } from './schema';
import { POST } from '../../common/api/plusRequest';
import type { OpenApiSchema } from '@fastgpt/global/support/openapi/type';
export type AuthOpenApiLimitProps = { openApi: OpenApiSchema };
@@ -17,11 +16,10 @@ export async function authOpenApiKey({ apikey }: { apikey: string }) {
}
// auth limit
// @ts-ignore
if (global.feConfigs?.isPlus) {
await POST('/support/openapi/authLimit', {
await global.authOpenApiHandler({
openApi
} as AuthOpenApiLimitProps);
});
}
updateApiKeyUsedTime(openApi._id);