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_set_status.go | |
parent | 99b9dd84cb4b0cfd3eb1fd50b07c8b826eb52d19 (diff) | |
download | git-bug-3f6ef50883492f77995a7e27872d0b5ae17b9d6a.tar.gz |
bug: migrate to the DAG entity structure!
Diffstat (limited to 'bug/op_set_status.go')
-rw-r--r-- | bug/op_set_status.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/bug/op_set_status.go b/bug/op_set_status.go index eb2c0ba4..fcf33f8c 100644 --- a/bug/op_set_status.go +++ b/bug/op_set_status.go @@ -21,21 +21,17 @@ type SetStatusOperation struct { // Sign-post method for gqlgen func (op *SetStatusOperation) IsOperation() {} -func (op *SetStatusOperation) base() *OpBase { - return &op.OpBase -} - func (op *SetStatusOperation) Id() entity.Id { - return idOperation(op) + return idOperation(op, &op.OpBase) } func (op *SetStatusOperation) Apply(snapshot *Snapshot) { snapshot.Status = op.Status - snapshot.addActor(op.Author) + snapshot.addActor(op.Author_) item := &SetStatusTimelineItem{ id: op.Id(), - Author: op.Author, + Author: op.Author_, UnixTime: timestamp.Timestamp(op.UnixTime), Status: op.Status, } @@ -44,7 +40,7 @@ func (op *SetStatusOperation) Apply(snapshot *Snapshot) { } func (op *SetStatusOperation) Validate() error { - if err := opBaseValidate(op, SetStatusOp); err != nil { + if err := op.OpBase.Validate(op, SetStatusOp); err != nil { return err } |