Files
AnimeTV-Backend/backup/modules/userSession/repositories/checkUserSessionInCache.repository.ts
Rafi Arrafif 8532d7e104 🚚 create backup folder
create backup folder for archive the old modules
2025-07-18 23:20:15 +07:00

14 lines
443 B
TypeScript

import { AppError } from "../../../helpers/error/instances/app";
import { redis } from "../../../utils/databases/redis/connection";
export const checkUserSessionInCacheRepo = async (redisKeyName: string) => {
try {
const userSessionInRedis = await redis.exists(redisKeyName);
if (!userSessionInRedis) return false;
return userSessionInRedis;
} catch (error) {
throw new AppError(500, "Server cache error", error);
}
};