Skip to content

Commit a1d5ab2

Browse files
fix: Update project response structure to use direct ID field
Co-Authored-By: [email protected] <[email protected]>
1 parent 2ac59c8 commit a1d5ab2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmd/sourcemaps/upload.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ func runE(client resources.Client) func(cmd *cobra.Command, args []string) error
128128
}
129129

130130
var projectResult struct {
131-
Items []struct {
132-
ID string `json:"_id"`
133-
}
131+
ID string `json:"_id"`
134132
}
135133
if err = json.Unmarshal(res, &projectResult); err != nil {
136134
return output.NewCmdOutputError(err, viper.GetString(cliflags.OutputFlag))
@@ -145,7 +143,7 @@ func runE(client resources.Client) func(cmd *cobra.Command, args []string) error
145143
backendUrl = defaultBackendUrl
146144
}
147145

148-
highlightKey, projectID, err := verifyApiKey(result.AccountID, projectResult.Items[0].ID, backendUrl)
146+
highlightKey, projectID, err := verifyApiKey(result.AccountID, projectResult.ID, backendUrl)
149147
if err != nil {
150148
return fmt.Errorf("failed to verify API key: %v", err)
151149
}

0 commit comments

Comments
 (0)