You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The request payload should have matched the payload structure of the response, where a `crate` wrapper property is used. This change adjusts the API accordingly.
assert_snapshot!(response.text(), @r#"{"errors":[{"detail":"This endpoint cannot be used with legacy API tokens. Use a scoped API token instead."}]}"#);
@@ -204,7 +204,7 @@ mod auth {
204
204
.await;
205
205
206
206
let url = format!("/api/v1/crates/{}",CRATE_NAME);
207
-
let body = serde_json::json!({"trustpub_only":true});
207
+
let body = serde_json::json!({"crate":{"trustpub_only":true}});
208
208
let response = token.patch::<()>(&url, body.to_string()).await;
209
209
assert_snapshot!(response.status(), @"200 OK");
210
210
@@ -224,7 +224,7 @@ mod auth {
224
224
.await;
225
225
226
226
let url = format!("/api/v1/crates/{}",CRATE_NAME);
227
-
let body = serde_json::json!({"trustpub_only":true});
227
+
let body = serde_json::json!({"crate":{"trustpub_only":true}});
228
228
let response = token.patch::<()>(&url, body.to_string()).await;
assert_snapshot!(response.text(), @r#"{"errors":[{"detail":"This endpoint cannot be used with legacy API tokens. Use a scoped API token instead."}]}"#);
@@ -266,7 +266,7 @@ mod auth {
266
266
.await;
267
267
268
268
let url = format!("/api/v1/crates/{}",CRATE_NAME);
269
-
let body = serde_json::json!({"trustpub_only":true});
269
+
let body = serde_json::json!({"crate":{"trustpub_only":true}});
270
270
let response = token.patch::<()>(&url, body.to_string()).await;
0 commit comments