httpd: Change `sha1` into `id`

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
This commit is contained in:
xphoniex 2023-01-19 14:25:49 +00:00 committed by Alexis Sellier
parent 57fbc1ed46
commit ccbcdd4998
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View File

@ -9,7 +9,7 @@ use serde_json::json;
/// Returns JSON of a commit. /// Returns JSON of a commit.
pub(crate) fn commit(commit: &Commit) -> serde_json::Value { pub(crate) fn commit(commit: &Commit) -> serde_json::Value {
json!({ json!({
"sha1": commit.id, "id": commit.id,
"author": { "author": {
"name": commit.author.name, "name": commit.author.name,
"email": commit.author.email "email": commit.author.email

View File

@ -524,7 +524,7 @@ mod routes {
"commits": [ "commits": [
{ {
"commit": { "commit": {
"sha1": HEAD, "id": HEAD,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"
@ -574,7 +574,7 @@ mod routes {
}, },
{ {
"commit": { "commit": {
"sha1": HEAD_1, "id": HEAD_1,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"
@ -648,7 +648,7 @@ mod routes {
response.json().await, response.json().await,
json!({ json!({
"commit": { "commit": {
"sha1": HEAD, "id": HEAD,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"
@ -728,7 +728,7 @@ mod routes {
} }
], ],
"lastCommit": { "lastCommit": {
"sha1": HEAD, "id": HEAD,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"
@ -771,7 +771,7 @@ mod routes {
} }
], ],
"lastCommit": { "lastCommit": {
"sha1": HEAD, "id": HEAD,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"
@ -852,7 +852,7 @@ mod routes {
"binary": false, "binary": false,
"content": "Hello World!\n", "content": "Hello World!\n",
"lastCommit": { "lastCommit": {
"sha1": HEAD_1, "id": HEAD_1,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"
@ -888,7 +888,7 @@ mod routes {
"binary": false, "binary": false,
"content": "Hello World!\n", "content": "Hello World!\n",
"lastCommit": { "lastCommit": {
"sha1": HEAD_1, "id": HEAD_1,
"author": { "author": {
"name": "Alice Liddell", "name": "Alice Liddell",
"email": "alice@radicle.xyz" "email": "alice@radicle.xyz"