From ccbcdd49984891a973018d6d30477d386ffc0e28 Mon Sep 17 00:00:00 2001 From: xphoniex Date: Thu, 19 Jan 2023 14:25:49 +0000 Subject: [PATCH] httpd: Change `sha1` into `id` Signed-off-by: xphoniex --- radicle-httpd/src/api/json.rs | 2 +- radicle-httpd/src/api/v1/projects.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/radicle-httpd/src/api/json.rs b/radicle-httpd/src/api/json.rs index 5fa27c5f..96cf79a3 100644 --- a/radicle-httpd/src/api/json.rs +++ b/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 diff --git a/radicle-httpd/src/api/v1/projects.rs b/radicle-httpd/src/api/v1/projects.rs index 53e90252..e12a1f2b 100644 --- a/radicle-httpd/src/api/v1/projects.rs +++ b/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"