diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2022-06-15 12:40:12 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2022-06-15 12:40:12 +0200 |
commit | 64496464b3812839c1e4b440bdf69cc84f39c491 (patch) | |
tree | a695e52f736c39e8518247bf48b9743506a3c32f /db/db.go | |
parent | 04a10f2acd73d88f90433755bfbe667c5174acb5 (diff) | |
download | mdir-64496464b3812839c1e4b440bdf69cc84f39c491.tar.gz mdir-64496464b3812839c1e4b440bdf69cc84f39c491.tar.bz2 mdir-64496464b3812839c1e4b440bdf69cc84f39c491.zip |
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
Diffstat (limited to 'db/db.go')
-rw-r--r-- | db/db.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,5 +17,5 @@ func ConnectDb() { panic("failed to connect to the database.") } - DB.AutoMigrate(&YdlEntry{}) + DB.AutoMigrate(&Entry{}) } |