~vpzom/lotide

61adafd107ca48e8c5999e6a97c533dd073fb6be — Colin Reeder 8 months ago ea9370a
Breaking API change: rename comments to replies in post info
2 files changed, 4 insertions(+), 4 deletions(-)

M openapi/openapi.json
M src/routes/api/posts.rs
M openapi/openapi.json => openapi/openapi.json +2 -2
@@ 1105,11 1105,11 @@
								"schema": {
									"allOf": [{"$ref": "#/components/schemas/PostListPost"}],
									"type": "object",
									"required": ["approved", "score", "comments"],
									"required": ["approved", "score", "replies"],
									"properties": {
										"approved": {"type": "boolean"},
										"score": {"type": "integer"},
										"comments": {
										"replies": {
											"type": "array",
											"items": {"$ref": "#/components/schemas/PostCommentInfo"}
										},

M src/routes/api/posts.rs => src/routes/api/posts.rs +2 -2
@@ 254,7 254,7 @@ async fn route_unstable_posts_get(
        post: &'a RespPostListPost<'a>,
        approved: bool,
        score: i64,
        comments: Vec<RespPostCommentInfo<'a>>,
        replies: Vec<RespPostCommentInfo<'a>>,
        #[serde(skip_serializing_if = "Option::is_none")]
        your_vote: Option<Option<crate::Empty>>,
    }


@@ 344,7 344,7 @@ async fn route_unstable_posts_get(

            let output = RespPostInfo {
                post: &post,
                comments,
                replies: comments,
                approved: row.get(14),
                score: row.get(13),
                your_vote,