Skip to content

Commit

Permalink
adjusted date to struct, added executable
Browse files Browse the repository at this point in the history
  • Loading branch information
gontzess committed Feb 4, 2022
1 parent ac03a5d commit 50ac9cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions db_controller/db_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/joho/godotenv"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
// "go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
Expand Down Expand Up @@ -38,7 +38,7 @@ var makeRandomId = func() func() string {

type Bin struct {
BinId string
Created_at primitive.Timestamp
Created_at time.Time
Rekwests []Rekwest
}

Expand Down Expand Up @@ -96,7 +96,8 @@ func Disconnect() {
func NewBin() (Bin, string) {
newBin := Bin{
BinId: makeRandomId(),
Created_at: primitive.Timestamp{T: uint32(time.Now().Unix())}, // time.Now().GoString(),
// Created_at: primitive.Timestamp{T: uint32(time.Now().Unix())}, // time.Now().GoString(),
Created_at: time.Now(),
Rekwests: make([]Rekwest, 0),
}
_, err := bins.InsertOne(context.TODO(), newBin)
Expand Down
Binary file added rekwest-bin
Binary file not shown.

0 comments on commit 50ac9cd

Please sign in to comment.