diff options
author | xengineering <me@xengineering.eu> | 2024-03-12 21:25:19 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-03-12 21:25:19 +0100 |
commit | 49ffaf0aac14272c2f64a3005ad651b78eb51ad1 (patch) | |
tree | bda93e20e99f91cd2f8c2b462d6cb3d2602853ee /model | |
parent | be01755f44442c0fa174a2c7fe3dfd39f185920f (diff) | |
download | ceres-49ffaf0aac14272c2f64a3005ad651b78eb51ad1.tar ceres-49ffaf0aac14272c2f64a3005ad651b78eb51ad1.tar.zst ceres-49ffaf0aac14272c2f64a3005ad651b78eb51ad1.zip |
model: Remove .Touch() method
The model package should never modify the data. Thus the functionality
to update timestamps is moved to the controller package which is
intended to modify data.
Diffstat (limited to 'model')
-rw-r--r-- | model/recipe.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/model/recipe.go b/model/recipe.go index db3af70..acd9a3b 100644 --- a/model/recipe.go +++ b/model/recipe.go @@ -5,7 +5,6 @@ import ( "encoding/json" "errors" "fmt" - "time" ) type Recipe struct { @@ -23,11 +22,6 @@ func (r Recipe) String() string { return string(b) } -func (r *Recipe) Touch() { - now := time.Now().Unix() - r.LastChanged = fmt.Sprint(now) -} - func (r *Recipe) Create() error { query := `INSERT INTO recipes (title, portions, url, notes, created, last_changed) |