don't allow going home unless profile details are complete
This commit is contained in:
parent
c38feef86f
commit
f57a20a3a3
3 changed files with 26 additions and 23 deletions
|
|
@ -20,7 +20,19 @@ async function setNym(publicKey, nym) {
|
|||
});
|
||||
}
|
||||
|
||||
async function areProfileDetailsComplete(publicKey) {
|
||||
const isNymSet = await NymSet.findOne({ where: { public_key: publicKey } });
|
||||
const areContactDetailsSet = await ContactDetailsSet.findOne({
|
||||
where: {
|
||||
public_key: publicKey,
|
||||
},
|
||||
});
|
||||
|
||||
return isNymSet && areContactDetailsSet;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
setContactDetails,
|
||||
setNym,
|
||||
areProfileDetailsComplete,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue