Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
httpd: Change `sha1` into `id`
xphoniex committed 3 years ago
commit f9e519296dcb9ebf8a2fd698f3b399db1df4cfe8
parent 05da23b707bb529271510c7529a626188cf2d0c3
2 files changed +8 -8
modified radicle-httpd/src/api/json.rs
@@ -9,7 +9,7 @@ use serde_json::json;
/// Returns JSON of a commit.
pub(crate) fn commit(commit: &Commit) -> serde_json::Value {
    json!({
-
      "sha1": commit.id,
+
      "id": commit.id,
      "author": {
        "name": commit.author.name,
        "email": commit.author.email
modified radicle-httpd/src/api/v1/projects.rs
@@ -524,7 +524,7 @@ mod routes {
              "commits": [
                {
                  "commit": {
-
                    "sha1": HEAD,
+
                    "id": HEAD,
                    "author": {
                      "name": "Alice Liddell",
                      "email": "alice@radicle.xyz"
@@ -574,7 +574,7 @@ mod routes {
                },
                {
                  "commit": {
-
                    "sha1": HEAD_1,
+
                    "id": HEAD_1,
                    "author": {
                      "name": "Alice Liddell",
                      "email": "alice@radicle.xyz"
@@ -648,7 +648,7 @@ mod routes {
            response.json().await,
            json!({
              "commit": {
-
                "sha1": HEAD,
+
                "id": HEAD,
                "author": {
                  "name": "Alice Liddell",
                  "email": "alice@radicle.xyz"
@@ -728,7 +728,7 @@ mod routes {
                  }
                ],
                "lastCommit": {
-
                  "sha1": HEAD,
+
                  "id": HEAD,
                  "author": {
                    "name": "Alice Liddell",
                    "email": "alice@radicle.xyz"
@@ -771,7 +771,7 @@ mod routes {
                }
              ],
              "lastCommit": {
-
                "sha1": HEAD,
+
                "id": HEAD,
                "author": {
                  "name": "Alice Liddell",
                  "email": "alice@radicle.xyz"
@@ -852,7 +852,7 @@ mod routes {
                "binary": false,
                "content": "Hello World!\n",
                "lastCommit": {
-
                    "sha1": HEAD_1,
+
                    "id": HEAD_1,
                    "author": {
                        "name": "Alice Liddell",
                        "email": "alice@radicle.xyz"
@@ -888,7 +888,7 @@ mod routes {
                "binary": false,
                "content": "Hello World!\n",
                "lastCommit": {
-
                    "sha1": HEAD_1,
+
                    "id": HEAD_1,
                    "author": {
                        "name": "Alice Liddell",
                        "email": "alice@radicle.xyz"