Redis – async function does not return json object
public async validateToken(req, res): Promise<any> { const token = req.headers.authorization.split(" ")[1] || req.params.token; await this.redisClient.SISMEMBER("tokenBlackListSet", token, function( err, data ) { if (data) { // here i get data=1 as token is present in tokenBlackListSet return { // so this…