clone-instagram/email_service/api/v1/email.service.js
/**
 * Creates email dispatch event
 * @param {string} eventName
 * @param {ObjectId} associatedUser
 * @returns Email Document
 */
Creates email dispatch event
@param {string} eventName
@param {ObjectId} associatedUser
@returns Email Document
Creates email dispatch event @param { string } eventName @param { ObjectId } associatedUser @returns Email Document
async function createOne(eventName, associatedUser) {
    const code = await uuid();
    const doc = await Email.create({
        verificationCode: code,
        eventName,
        associatedUser,
    });
    return doc;
}
async function createOne ( eventName , associatedUser ) { const code = await uuid ( ) ; const doc = await Email . create ( { verificationCode : code , eventName , associatedUser , } ) ; return doc ; }
Creates email dispatch event
 @param {string} eventName
 @param {ObjectId} associatedUser
 @returns Email Document
Creates email dispatch event @param { string } eventName @param { ObjectId } associatedUser @returns Email Document