moahmedwafy's picture
update: refactor guards
6a7bf05
raw
history blame contribute delete
246 Bytes
import { IJwtLoginPayload } from "@common/interfaces/jwt-payload.interface";
import { genGuard } from "@lib/guards/gen-guard";
export const UsersGuardMiddleware = genGuard(
async (args, payload: IJwtLoginPayload) => payload.type === "user"
);