Add id to revision type

This commit is contained in:
Sebastian Martinez
2024-10-03 11:51:12 +02:00
parent d3d690c0fb
commit 56cbb761d5
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ import type { Reaction } from "./Reaction";
import type { Review } from "./Review";
export type Revision = {
id: string;
author: Author;
description: Array<Edit>;
base: string;
+3
View File
@@ -125,6 +125,8 @@ impl Patch {
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct Revision {
#[ts(as = "String")]
id: patch::RevisionId,
author: Author,
description: Vec<Edit>,
#[ts(as = "String")]
@@ -141,6 +143,7 @@ pub struct Revision {
impl Revision {
pub fn new(value: cob::patch::Revision, aliases: &impl AliasStore) -> Self {
Self {
id: value.id(),
author: Author::new(*value.author().id(), aliases),
description: value
.edits()