fix(medusa-plugin-brightpearl): reliable oauth (#119)

This commit is contained in:
Sebastian Rindom authored and GitHub committed 2020-10-05 11:48:20 +02:00
1 parent a06d603722
commit 0889059ba1
5 files changed
+37 -41

No files matched your search

+2 -1
View File
@@ -83,8 +83,9 @@ class Oauth extends OauthService {
})
}
async refreshToken(appName, refreshToken) {
async refreshToken(appName) {
const app = await this.retrieveByName(appName)
const refreshToken = app.data.refresh_token
const service = this.container_[`${app.application_name}Oauth`]
if (!service) {
throw new MedusaError(