feat: add timestamp for card creation #9
3 changed files with 4 additions and 4 deletions
|
@ -221,7 +221,7 @@ func (b *Board) CreateCard(args CardArgs) (int, error) {
|
|||
ID: -1,
|
||||
Title: args.NewTitle,
|
||||
Content: args.NewContent,
|
||||
Created: timestamp,
|
||||
Created: timestamp,
|
||||
}
|
||||
|
||||
cardID, err := db.Write(b.db, db.CardBucket, &card)
|
||||
|
|
|
@ -15,7 +15,7 @@ type Card struct {
|
|||
ID int
|
||||
Title string
|
||||
Content string
|
||||
Created string
|
||||
Created string
|
||||
}
|
||||
|
||||
// UpdateId updates the ID of the Card value.
|
||||
|
|
|
@ -141,7 +141,7 @@ func testUpdateCard(kanban board.Board, cardID int, newTitle, newContent, timest
|
|||
ID: cardID,
|
||||
Title: newTitle,
|
||||
Content: newContent,
|
||||
Created: timestamp,
|
||||
Created: timestamp,
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
|
@ -177,7 +177,7 @@ func testUpdateCardContent(kanban board.Board, cardID int, expectedTitle, newCon
|
|||
ID: cardID,
|
||||
Title: expectedTitle,
|
||||
Content: newContent,
|
||||
Created: timestamp,
|
||||
Created: timestamp,
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
|
|
Loading…
Reference in a new issue