Skip to content

Commit

Permalink
Merge pull request #119 from acemtp/patch-2
Browse files Browse the repository at this point in the history
fix missing Async
  • Loading branch information
StorytellerCZ authored Jun 20, 2024
2 parents 00bce29 + db73984 commit 34a44f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions link_accounts_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Meteor.methods({
},
'bozhao:linkAccountsWeb3': async function (address) {
check(address, String)
const user = Meteor.users.findOne({ 'services.web3.address': address })
const user = await Meteor.users.findOneAsync({ 'services.web3.address': address })
if (user) throw new Meteor.Error('500', 'This address is already assigned!')
return await Accounts.LinkUserFromExternalService(
'web3',
Expand Down Expand Up @@ -193,7 +193,7 @@ Accounts.unlinkService = async function (userId, serviceName, cb) {
if (typeof serviceName !== 'string') {
throw new Meteor.Error('Service name must be string')
}
const user = Meteor.users.findOne({ _id: userId })
const user = await Meteor.users.findOneAsync({ _id: userId })
if (serviceName === 'resume' || serviceName === 'password') {
throw new Meteor.Error(
'Internal services cannot be unlinked: ' + serviceName
Expand Down

0 comments on commit 34a44f8

Please sign in to comment.