feat: Add function in controller to remove whatsapp cache in Redis

feat-scaling-ticket-remote-creation
adriano 2024-03-07 11:53:50 -03:00
parent 9d4b80986d
commit ec6e84f567
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ import { getSettingValue } from "../helpers/WhaticketSettings";
import ListWhatsAppsNumber from "../services/WhatsappService/ListWhatsAppsNumber";
import SettingTicket from "../models/SettingTicket";
import { Op } from "sequelize";
import { get, set } from "../helpers/RedisClient";
import { del, get, set } from "../helpers/RedisClient";
interface WhatsappData {
name: string;
@ -514,6 +514,8 @@ export const remove = async (
});
}
await del(`whatsapp:${whatsappId}`);
let whats = await ListWhatsAppsNumber(whatsappId);
// Remove tickets business hours config