17 lines
603 B
JavaScript
17 lines
603 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.mapPrismaUserToUserAuth = mapPrismaUserToUserAuth;
|
|
const schema_1 = require("../../schema");
|
|
function mapPrismaUserToUserAuth(raw) {
|
|
return schema_1.userAuthSchema.parse({
|
|
id: raw.id,
|
|
email: raw.email,
|
|
role: raw.role,
|
|
mfaEnabled: !!raw.mfaSecret,
|
|
emailVerified: raw.emailVerified,
|
|
lastLoginAt: raw.lastLoginAt?.toISOString(),
|
|
createdAt: raw.createdAt.toISOString(),
|
|
updatedAt: raw.updatedAt.toISOString(),
|
|
});
|
|
}
|
|
//# sourceMappingURL=mapper.js.map
|