Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update endpoint for Project #7

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion DS3Lib/Constants/URLs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ enum CubbitAPIURLs {

static let meURL = "\(accounts.baseURL)/me"
}
}

enum composerHub {
static let baseURL = "\(CubbitAPIURLs.baseURL)/composer-hub/v1"

static let projects = "\(IAM.baseURL)/projects"
static let projects = "\(composerHub.baseURL)/projects"
}

/// Cubbit's internal KMS related URLs.
Expand Down
2 changes: 1 addition & 1 deletion DS3Lib/DS3SDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum DS3SDKError: Error, LocalizedError {
func getRemoteProjects() async throws -> [Project] {
try await self.authentication.refreshIfNeeded()

guard let url = URL(string: CubbitAPIURLs.IAM.projects) else { throw DS3AuthenticationError.invalidURL(url: CubbitAPIURLs.IAM.projects) }
guard let url = URL(string: CubbitAPIURLs.composerHub.projects) else { throw DS3AuthenticationError.invalidURL(url: CubbitAPIURLs.composerHub.projects) }
guard let session = self.authentication.accountSession else { throw DS3AuthenticationError.loggedOut }

var request = URLRequest(url: url)
Expand Down
Loading