Skip to content

Commit

Permalink
chore: update privatisation status after amplify call succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderleegs committed Jan 4, 2024
1 parent 142d22f commit 5595f8f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/services/configServices/SettingsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ class SettingsService {
// only when changing from public to private - not awaited as this is slow and non-blocking
privatiseNetlifySite(siteName, password)
}
const updatePasswordResp = await this.deploymentsService.updateAmplifyPassword(
siteName,
password,
enablePassword
)
if (updatePasswordResp.isErr()) {
return updatePasswordResp
}
if (isPrivate !== enablePassword) {
// For public -> private or private -> public, we also need to update the repo privacy on github
const privatiseRepoRes = await this.gitHubService.changeRepoPrivacy(
Expand All @@ -189,11 +197,7 @@ class SettingsService {
return errAsync(err)
}
}
return this.deploymentsService.updateAmplifyPassword(
siteName,
password,
enablePassword
)
return updatePasswordResp
}

shouldUpdateHomepage(updatedConfigContent, configContent) {
Expand Down

0 comments on commit 5595f8f

Please sign in to comment.