Skip to content

Commit

Permalink
fix missing Async
Browse files Browse the repository at this point in the history
  • Loading branch information
acemtp authored Jun 19, 2024
1 parent 00bce29 commit db73984
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 db73984

Please sign in to comment.