MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / getUserImageForVerification

Function getUserImageForVerification

models/users.js:544–555  ·  view source on GitHub ↗
(userId)

Source from the content-addressed store, hash-verified

542 await documentRef.update(unverifiedUserData);
543 } else await photoVerificationModel.add(unverifiedUserData);
544 } catch (err) {
545 logger.error("Error in creating Verification Entry", err);
546 throw err;
547 }
548 return { message: "Profile data added for verification successfully" };
549};
550
551/**
552 * Removes if user passed a valid image; ignores if no unverified record
553 * @param userId {String} - RDS user Id
554 * @param type {String} - type of image that was verified
555 * @return {Promise<{message: string}|{message: string}>}
556 * @throws {Error} - If error occurs while verifying user's image
557 */
558const markAsVerified = async (userId, imageType) => {

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected