|
@@ -33,7 +33,7 @@ export const deleteAiAssistant = async(ownerId: string, aiAssistantId: string):
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const deleteUserAiAssistant = async(user: IUserHasId): Promise<void> => {
|
|
export const deleteUserAiAssistant = async(user: IUserHasId): Promise<void> => {
|
|
|
- if (!isAiEnabled()) {
|
|
|
|
|
|
|
+ if (isAiEnabled()) {
|
|
|
const aiAssistants = await AiAssistantModel.find({ owner: user });
|
|
const aiAssistants = await AiAssistantModel.find({ owner: user });
|
|
|
for await (const aiAssistant of aiAssistants) {
|
|
for await (const aiAssistant of aiAssistants) {
|
|
|
try {
|
|
try {
|