Skip to content

Commit

Permalink
fix creating new url mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
alexferl committed Nov 19, 2018
1 parent 6f054a2 commit fb0c7bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions model/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type UrlMapping struct {
func NewUrlMapping(url string) *UrlMapping {
now := time.Now().UTC()
return &UrlMapping{
Id: bson.NewObjectId(),
CreatedAt: &now,
ShortUrl: token.New().Encode(),
Url: url,
Expand Down

0 comments on commit fb0c7bb

Please sign in to comment.