register controller

This commit is contained in:
Fran Jurmanović
2021-05-08 18:26:02 +02:00
parent 20894ee42e
commit 316c39b2dd
12 changed files with 193 additions and 3 deletions

View File

@@ -1,9 +1,25 @@
package common
import "log"
import (
"log"
"time"
"wallet-api/pkg/models"
"github.com/google/uuid"
)
func CheckError(err error) {
if err != nil {
log.Fatalf("Error occured. %v", err)
}
}
func CreateDbModel() models.CommonModel {
date := time.Now()
dbModel := models.CommonModel{
Id: uuid.NewString(),
DateCreated: date,
DateUpdated: date,
}
return dbModel
}