From 64496464b3812839c1e4b440bdf69cc84f39c491 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Wed, 15 Jun 2022 12:40:12 +0200 Subject: ref: Move to a MVC like approach Before everything was dumped into the controller file, now it is spread out a bit. It is still far from good, like the controller is not really a controller... baby steps I guess The refactored was based on this post: https://www.alexedwards.net/blog/organising-database-access --- db/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/db.go') diff --git a/db/db.go b/db/db.go index 128dcc8..5c904fd 100644 --- a/db/db.go +++ b/db/db.go @@ -17,5 +17,5 @@ func ConnectDb() { panic("failed to connect to the database.") } - DB.AutoMigrate(&YdlEntry{}) + DB.AutoMigrate(&Entry{}) } -- cgit v1.2.3