From 6dcc2a31d76ce8b95c76bf05a72001d3ac73521f Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Thu, 15 Jun 2023 15:36:09 +0200 Subject: [PATCH] radicle: Change review data in patch COB * `CodeLocation` had a `blob` and `commit` field. These are redundant, since the review lives under a revision. We also change the line range to be diff-compatible, with an old and new range. The ranges are optional to account for different scenarios like file deletion, move etc. * `CodeComment` had redundant getters which were removed in favor of public fields. We also remove the `timestamp` field, as it will be the same as the review timestamp. --- radicle-httpd/src/api/v1/projects.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/radicle-httpd/src/api/v1/projects.rs b/radicle-httpd/src/api/v1/projects.rs index 9d864f00c..9f97d5bbe 100644 --- a/radicle-httpd/src/api/v1/projects.rs +++ b/radicle-httpd/src/api/v1/projects.rs @@ -2309,16 +2309,11 @@ mod routes { "inline": [ { "location": { - "blob": "82eb77880c693655bce074e3dbbd9fa711dc018b", "path": "./README.md", - "commit": HEAD, - "lines": { - "start": 1, - "end": 3, - }, + "old": null, + "new": null, }, "comment": "This is a comment on line 1", - "timestamp": TIMESTAMP, } ], "timestamp": TIMESTAMP,