From 556edc5d362047f2f308b811442d002044a63ee2 Mon Sep 17 00:00:00 2001 From: Nicolas Polomack Date: Thu, 25 May 2023 13:48:55 +0200 Subject: [PATCH] fix: fixed errors in `cargo owner` commands --- crates/alexandrie/src/api/crates/owners.rs | 4 ++-- docs/src/programmatic-api/crates/owners/delete.md | 2 +- docs/src/programmatic-api/crates/owners/put.md | 2 +- docs/src/programmatic-api/crates/unyank/put.md | 2 +- docs/src/programmatic-api/crates/yank/delete.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/alexandrie/src/api/crates/owners.rs b/crates/alexandrie/src/api/crates/owners.rs index a423190d..0c9ca861 100644 --- a/crates/alexandrie/src/api/crates/owners.rs +++ b/crates/alexandrie/src/api/crates/owners.rs @@ -171,7 +171,7 @@ pub(crate) async fn put(mut req: Request) -> tide::Result { }; let data = json!({ - "ok": "true", + "ok": true, "msg": format!("{0} has been added as authors of {1}", authors_list, name), }); Ok(utils::response::json(&data)) @@ -274,7 +274,7 @@ pub(crate) async fn delete(mut req: Request) -> tide::Result { }; let data = json!({ - "ok": "true", + "ok": true, "msg": format!("{0} has been removed from authors of {1}", authors_list, name), }); Ok(utils::response::json(&data)) diff --git a/docs/src/programmatic-api/crates/owners/delete.md b/docs/src/programmatic-api/crates/owners/delete.md index 777c3b5b..b68a613b 100644 --- a/docs/src/programmatic-api/crates/owners/delete.md +++ b/docs/src/programmatic-api/crates/owners/delete.md @@ -43,7 +43,7 @@ Currently, the registry will return an object of the following shape: ```js { // Whether the operation went well. - "ok": "true", + "ok": true, // A human-displayable message describing the operation's outcome. "msg": "John Doe and Nicolas Polomack has been removed from authors", } diff --git a/docs/src/programmatic-api/crates/owners/put.md b/docs/src/programmatic-api/crates/owners/put.md index ba983836..9deb2563 100644 --- a/docs/src/programmatic-api/crates/owners/put.md +++ b/docs/src/programmatic-api/crates/owners/put.md @@ -43,7 +43,7 @@ Currently, the registry will return an object of the following shape: ```js { // Whether the operation went well. - "ok": "true", + "ok": true, // A human-displayable message describing the operation's outcome. "msg": "John Doe and Nicolas Polomack has been added as authors", } diff --git a/docs/src/programmatic-api/crates/unyank/put.md b/docs/src/programmatic-api/crates/unyank/put.md index f1cd7423..22f2fb9f 100644 --- a/docs/src/programmatic-api/crates/unyank/put.md +++ b/docs/src/programmatic-api/crates/unyank/put.md @@ -29,6 +29,6 @@ Currently, the registry will return an object of the following shape: ```js { // Whether the operation went well. - "ok": "true", + "ok": true, } ``` diff --git a/docs/src/programmatic-api/crates/yank/delete.md b/docs/src/programmatic-api/crates/yank/delete.md index 4f944599..1e44a7c2 100644 --- a/docs/src/programmatic-api/crates/yank/delete.md +++ b/docs/src/programmatic-api/crates/yank/delete.md @@ -29,6 +29,6 @@ Currently, the registry will return an object of the following shape: ```js { // Whether the operation went well. - "ok": "true", + "ok": true, } ```