aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_pack.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-29 20:41:19 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-29 20:41:19 +0200
commitc46d01f8c10e6363b680fa6876e91bd8eaf3bb3e (patch)
treedde41c1253534bf4ff36e39454f2bdbdf4b9590f /bug/operation_pack.go
parent41e61a67b63e4d6c517005cf6f427115a664bdb5 (diff)
downloadgit-bug-c46d01f8c10e6363b680fa6876e91bd8eaf3bb3e.tar.gz
bug: implement comment edition
- add a new operation - add a new "timeline" in the snapshot that hold a processed version of the operations
Diffstat (limited to 'bug/operation_pack.go')
-rw-r--r--bug/operation_pack.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/bug/operation_pack.go b/bug/operation_pack.go
index 5238ea60..f33d94bf 100644
--- a/bug/operation_pack.go
+++ b/bug/operation_pack.go
@@ -74,23 +74,27 @@ func (opp *OperationPack) UnmarshalJSON(data []byte) error {
func (opp *OperationPack) unmarshalOp(raw []byte, _type OperationType) (Operation, error) {
switch _type {
case CreateOp:
- op := CreateOperation{}
+ op := &CreateOperation{}
err := json.Unmarshal(raw, &op)
return op, err
case SetTitleOp:
- op := SetTitleOperation{}
+ op := &SetTitleOperation{}
err := json.Unmarshal(raw, &op)
return op, err
case AddCommentOp:
- op := AddCommentOperation{}
+ op := &AddCommentOperation{}
err := json.Unmarshal(raw, &op)
return op, err
case SetStatusOp:
- op := SetStatusOperation{}
+ op := &SetStatusOperation{}
err := json.Unmarshal(raw, &op)
return op, err
case LabelChangeOp:
- op := LabelChangeOperation{}
+ op := &LabelChangeOperation{}
+ err := json.Unmarshal(raw, &op)
+ return op, err
+ case EditCommentOp:
+ op := &EditCommentOperation{}
err := json.Unmarshal(raw, &op)
return op, err
default: