fixing permission & menu

This commit is contained in:
Warunee Tamkoo 2024-08-14 17:37:20 +07:00
parent 53787597fd
commit 24bbcc6f7f
2 changed files with 44 additions and 29 deletions

View file

@ -21,6 +21,7 @@ import { AuthRole, CreateAuthRole, UpdateAuthRole, CreateAddAuthRole } from "../
import { AuthRoleAttr } from "../entities/AuthRoleAttr";
import { PosMaster } from "../entities/PosMaster";
import { EmployeePosMaster } from "../entities/EmployeePosMaster";
import { promisify } from "util";
const REDIS_HOST = process.env.REDIS_HOST;
const REDIS_PORT = process.env.REDIS_PORT;
@ -108,9 +109,13 @@ export class AuthRoleController extends Controller {
host: REDIS_HOST,
port: REDIS_PORT,
});
redisClient.del("role_" + posMaster.current_holderId, (err: Error, response: Response) => {
if (err) throw err;
console.log(response);
});
redisClient.del("menu_" + posMaster.current_holderId, (err: Error, response: Response) => {
if (err) throw err;
});
}