feat: Add function in controller to remove whatsapp cache in Redis
parent
9d4b80986d
commit
ec6e84f567
|
@ -42,7 +42,7 @@ import { getSettingValue } from "../helpers/WhaticketSettings";
|
||||||
import ListWhatsAppsNumber from "../services/WhatsappService/ListWhatsAppsNumber";
|
import ListWhatsAppsNumber from "../services/WhatsappService/ListWhatsAppsNumber";
|
||||||
import SettingTicket from "../models/SettingTicket";
|
import SettingTicket from "../models/SettingTicket";
|
||||||
import { Op } from "sequelize";
|
import { Op } from "sequelize";
|
||||||
import { get, set } from "../helpers/RedisClient";
|
import { del, get, set } from "../helpers/RedisClient";
|
||||||
|
|
||||||
interface WhatsappData {
|
interface WhatsappData {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -514,6 +514,8 @@ export const remove = async (
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await del(`whatsapp:${whatsappId}`);
|
||||||
|
|
||||||
let whats = await ListWhatsAppsNumber(whatsappId);
|
let whats = await ListWhatsAppsNumber(whatsappId);
|
||||||
|
|
||||||
// Remove tickets business hours config
|
// Remove tickets business hours config
|
||||||
|
|
Loading…
Reference in New Issue