@dotenvx/dotenvx-pro
Version:
Secrets Manager for Env Files
22 lines (16 loc) • 496 B
JavaScript
const User = require('./../../db/user')
const PostMePublicKey = require('./../../lib/api/postMePublicKey')
class SyncPublicKey {
constructor (hostname, token, publicKey) {
this.hostname = hostname
this.token = token
this.publicKey = publicKey
}
async run () {
const remoteUser = await new PostMePublicKey(this.hostname, this.token, this.publicKey).run()
const user = new User()
user.store.store = remoteUser
return user
}
}
module.exports = SyncPublicKey