Skip to content

#1348 EnterpriseServerApi refactor#1461

Merged
sosnovsky merged 9 commits intomasterfrom
feature/issue-1348-enterprise-server-refactor
Apr 4, 2022
Merged

#1348 EnterpriseServerApi refactor#1461
sosnovsky merged 9 commits intomasterfrom
feature/issue-1348-enterprise-server-refactor

Conversation

@sosnovsky
Copy link
Collaborator

@sosnovsky sosnovsky commented Mar 29, 2022

This PR adds email property to EnterpriseServerApi to be able to fetch fesUrl only once

close #1348


Tests (delete all except exactly one):

  • Tests added or updated - updated EnterpriseServerApiTests

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

early review

@sosnovsky sosnovsky marked this pull request as ready for review April 4, 2022 17:39
@sosnovsky sosnovsky requested a review from tomholub April 4, 2022 17:39
Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving but would like to discuss the below point in another issue.

return nil // on consumer installations, we only use FES if it returns as expected
}
let helper = EnterpriseServerApiHelper()
self.fesUrl = try await helper.getActiveFesUrl(for: email)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder - could there be situations when EnterpriseServerApi is initiated but a call to check if FES is active is not actually needed in that moment? We could maybe instead have fesUrl as a lazy computed property?

@sosnovsky sosnovsky merged commit b2a0169 into master Apr 4, 2022
@sosnovsky sosnovsky deleted the feature/issue-1348-enterprise-server-refactor branch April 4, 2022 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor EnterpriseServerApi for single-fetching of fesUrl

2 participants