@checkfirst/nestjs-outlook
Version:
An opinionated NestJS module for Microsoft Outlook integration that provides easy access to Microsoft Graph API for emails, calendars, and more.
17 lines • 654 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getExternalUserIdFromUserId = getExternalUserIdFromUserId;
async function getExternalUserIdFromUserId(userId, microsoftUserRepository, logger) {
try {
const user = await microsoftUserRepository.findOne({ where: { id: userId } });
if (user && typeof user.externalUserId === 'string') {
return user.externalUserId;
}
return null;
}
catch (error) {
logger.error(`Error getting externalUserId for userId ${String(userId)}:`, error);
return null;
}
}
//# sourceMappingURL=shared-user.service.js.map