mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-09-01 12:08:24 -06:00
remove open ai key validation
This commit is contained in:
parent
39606240da
commit
2c780089aa
@ -236,15 +236,15 @@ export class OpenaiController extends BaseChatbotController<OpenaiBot, OpenaiDto
|
|||||||
if (!data.name) throw new BadRequestException('Name is required');
|
if (!data.name) throw new BadRequestException('Name is required');
|
||||||
|
|
||||||
// Check if API key already exists
|
// Check if API key already exists
|
||||||
const existingApiKey = await this.credsRepository.findFirst({
|
// const existingApiKey = await this.credsRepository.findFirst({
|
||||||
where: {
|
// where: {
|
||||||
apiKey: data.apiKey,
|
// apiKey: data.apiKey,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (existingApiKey) {
|
// if (existingApiKey) {
|
||||||
throw new BadRequestException('This API key is already registered. Please use a different API key.');
|
// throw new BadRequestException('This API key is already registered. Please use a different API key.');
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Check if name already exists for this instance
|
// Check if name already exists for this instance
|
||||||
const existingName = await this.credsRepository.findFirst({
|
const existingName = await this.credsRepository.findFirst({
|
||||||
|
Loading…
Reference in New Issue
Block a user