From f065bce876c6326f9144bef6834fcfe88bef6172 Mon Sep 17 00:00:00 2001 From: xphoniex Date: Thu, 19 Jan 2023 14:17:48 +0000 Subject: [PATCH] httpd: change `committerTime` into `committer.time` Signed-off-by: xphoniex --- radicle-httpd/src/api/json.rs | 6 +++--- radicle-httpd/src/api/v1/projects.rs | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/radicle-httpd/src/api/json.rs b/radicle-httpd/src/api/json.rs index d503d3e4..5fa27c5f 100644 --- a/radicle-httpd/src/api/json.rs +++ b/radicle-httpd/src/api/json.rs @@ -18,9 +18,9 @@ pub(crate) fn commit(commit: &Commit) -> serde_json::Value { "description": commit.description(), "committer": { "name": commit.committer.name, - "email": commit.committer.email - }, - "committerTime": commit.committer.time.seconds() + "email": commit.committer.email, + "time": commit.committer.time.seconds() + } }) } diff --git a/radicle-httpd/src/api/v1/projects.rs b/radicle-httpd/src/api/v1/projects.rs index 68c9e11f..b8ead43a 100644 --- a/radicle-httpd/src/api/v1/projects.rs +++ b/radicle-httpd/src/api/v1/projects.rs @@ -533,9 +533,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "diff": { "added": [ @@ -583,9 +583,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "diff": { "added": [ @@ -657,9 +657,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "diff": { "added": [ @@ -737,9 +737,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "name": "", "path": "", @@ -780,9 +780,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "name": "dir1", "path": "dir1", @@ -861,9 +861,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "name": "README", "path": "README" @@ -897,9 +897,9 @@ mod routes { "description": "", "committer": { "name": "Alice Liddell", - "email": "alice@radicle.xyz" + "email": "alice@radicle.xyz", + "time": 1673001014 }, - "committerTime": 1673001014 }, "name": "README", "path": "README"