Skip to content

Commit

Permalink
fix: api routes (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
proksh authored Feb 12, 2025
1 parent 294f6f9 commit a4842ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions maestro-cli/src/main/java/maestro/cli/api/ApiClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class ApiClient(
projectId: String?,
): UploadStatus {
val baseUrl = if (projectId != null) {
"$baseUrl/upload/$uploadId"
"$baseUrl/v2/project/$projectId/upload/$uploadId"
} else {
"$baseUrl/v2/upload/$uploadId/status?includeErrors=true"
}
Expand Down Expand Up @@ -328,11 +328,12 @@ class ApiClient(
appBinaryId = appBinaryId,
disableNotifications = disableNotifications,
deviceLocale = deviceLocale,
projectId = projectId,
)
}

val url = if (projectId != null) {
"$baseUrl/runMaestroTest"
"$baseUrl/v2/project/$projectId/runMaestroTest"
} else {
"$baseUrl/v2/upload"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class CloudCommand : Callable<Int> {
// Upload
val apiUrl = apiUrl ?: run {
if (projectId != null) {
"https://api.copilot.mobile.dev/v2/project/$projectId"
"https://api.copilot.mobile.dev"
} else {
throw CliError("You need to specify a Robin project with --projectId")
}
Expand Down

0 comments on commit a4842ad

Please sign in to comment.