diff --git a/controller/controller.go b/controller/controller.go
index 7cbee6a499fa7308f5251df609fdcce179979afd..7fc874847299fe4623b4e2754425bca2b00cd806 100644
--- a/controller/controller.go
+++ b/controller/controller.go
@@ -38,7 +38,7 @@
func (e *Env) CreateEntry(c *gin.Context) {
var entry db.Entry
c.ShouldBind(&entry)
- e.Entries.Create(entry)
+ e.Entries.Create(&entry)
e.Worker.SpawnWorker(entry.ID, entry.Link, entry.OutputFolder)
c.Redirect(http.StatusFound, "/")
}
diff --git a/db/model.go b/db/model.go
index 4b814f9e78828b1f26edf72722cb9251c0745b7e..01d9b9f72f6dff2b08fdeac296ee8cd4cb054c3c 100644
--- a/db/model.go
+++ b/db/model.go
@@ -29,8 +29,8 @@ m.DB.Find(&entries)
return entries
}
-func (m EntryModel) Create(entry Entry) {
- m.DB.Create(&entry)
+func (m EntryModel) Create(entry *Entry) {
+ m.DB.Create(entry)
}
func (m EntryModel) Update(entry Entry) {