aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_label_change.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-02-14 11:36:32 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:19:50 +0100
commit3f6ef50883492f77995a7e27872d0b5ae17b9d6a (patch)
tree97677642f1b01c73c8c5a708ea0ec67ced8c402f /bug/op_label_change.go
parent99b9dd84cb4b0cfd3eb1fd50b07c8b826eb52d19 (diff)
downloadgit-bug-3f6ef50883492f77995a7e27872d0b5ae17b9d6a.tar.gz
bug: migrate to the DAG entity structure!
Diffstat (limited to 'bug/op_label_change.go')
-rw-r--r--bug/op_label_change.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/bug/op_label_change.go b/bug/op_label_change.go
index fefe2402..5e51534d 100644
--- a/bug/op_label_change.go
+++ b/bug/op_label_change.go
@@ -24,17 +24,13 @@ type LabelChangeOperation struct {
// Sign-post method for gqlgen
func (op *LabelChangeOperation) IsOperation() {}
-func (op *LabelChangeOperation) base() *OpBase {
- return &op.OpBase
-}
-
func (op *LabelChangeOperation) Id() entity.Id {
- return idOperation(op)
+ return idOperation(op, &op.OpBase)
}
// Apply apply the operation
func (op *LabelChangeOperation) Apply(snapshot *Snapshot) {
- snapshot.addActor(op.Author)
+ snapshot.addActor(op.Author_)
// Add in the set
AddLoop:
@@ -66,7 +62,7 @@ AddLoop:
item := &LabelChangeTimelineItem{
id: op.Id(),
- Author: op.Author,
+ Author: op.Author_,
UnixTime: timestamp.Timestamp(op.UnixTime),
Added: op.Added,
Removed: op.Removed,
@@ -76,7 +72,7 @@ AddLoop:
}
func (op *LabelChangeOperation) Validate() error {
- if err := opBaseValidate(op, LabelChangeOp); err != nil {
+ if err := op.OpBase.Validate(op, LabelChangeOp); err != nil {
return err
}