cleanup, setting created/updated time

pull/99/head
Karolis Rusenas 2017-08-28 20:16:40 +01:00
parent c41fa55cb7
commit fb29f8d701
2 changed files with 3 additions and 4 deletions

View File

@ -159,6 +159,9 @@ func (m *DefaultManager) Create(r *types.Approval) error {
return ErrApprovalAlreadyExists
}
r.CreatedAt = time.Now()
r.UpdatedAt = time.Now()
bts, err := m.serializer.Encode(r)
if err != nil {
return err

View File

@ -1,7 +1,6 @@
package bot
import (
"bytes"
"context"
"encoding/json"
"errors"
@ -13,7 +12,6 @@ import (
"github.com/nlopes/slack"
"github.com/rusenask/keel/approvals"
"github.com/rusenask/keel/bot/formatter"
"github.com/rusenask/keel/provider/kubernetes"
"github.com/rusenask/keel/types"
@ -331,5 +329,3 @@ func (b *Bot) trimBot(msg string) string {
func formatAsSnippet(response string) string {
return "```" + response + "```"
}