clear data in redis

This commit is contained in:
Warunee Tamkoo 2024-08-01 15:55:30 +07:00
parent d51e6cf0f0
commit b5123630f8

View file

@ -219,6 +219,15 @@ export class AuthRoleController extends Controller {
...newAttrs.map((attr) => this.authRoleAttrRepo.save(attr)),
]);
const redisClient = await this.redis.createClient({
host: REDIS_HOST,
port: REDIS_PORT,
});
await redisClient.flushdb(function (err: any, succeeded: any) {
console.log(succeeded); // will be true if successfull
});
return new HttpSuccess();
}