diff options
author | Michael Muré <batolettre@gmail.com> | 2021-02-14 11:36:32 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-02-14 12:19:50 +0100 |
commit | 3f6ef50883492f77995a7e27872d0b5ae17b9d6a (patch) | |
tree | 97677642f1b01c73c8c5a708ea0ec67ced8c402f /bug/op_edit_comment.go | |
parent | 99b9dd84cb4b0cfd3eb1fd50b07c8b826eb52d19 (diff) | |
download | git-bug-3f6ef50883492f77995a7e27872d0b5ae17b9d6a.tar.gz |
bug: migrate to the DAG entity structure!
Diffstat (limited to 'bug/op_edit_comment.go')
-rw-r--r-- | bug/op_edit_comment.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bug/op_edit_comment.go b/bug/op_edit_comment.go index 5bfc36bf..f9e30e62 100644 --- a/bug/op_edit_comment.go +++ b/bug/op_edit_comment.go @@ -27,19 +27,15 @@ type EditCommentOperation struct { // Sign-post method for gqlgen func (op *EditCommentOperation) IsOperation() {} -func (op *EditCommentOperation) base() *OpBase { - return &op.OpBase -} - func (op *EditCommentOperation) Id() entity.Id { - return idOperation(op) + return idOperation(op, &op.OpBase) } func (op *EditCommentOperation) Apply(snapshot *Snapshot) { // Todo: currently any message can be edited, even by a different author // crypto signature are needed. - snapshot.addActor(op.Author) + snapshot.addActor(op.Author_) var target TimelineItem @@ -85,7 +81,7 @@ func (op *EditCommentOperation) GetFiles() []repository.Hash { } func (op *EditCommentOperation) Validate() error { - if err := opBaseValidate(op, EditCommentOp); err != nil { + if err := op.OpBase.Validate(op, EditCommentOp); err != nil { return err } |