-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* squashed the changes from #214 for simpler review * reverted changing Crontab table name * fixed a typo in one table * tested a different implementation of canteen rating tags * tested different rating tag configuration * refactored dishratingtags * different test * tested different rating tags * tested different rating tags * finally figured out how rating tags should work * tested simplifications to the Feedback model * tested simplifications to the Feedback model * made sure that `autoIncrement` is spelled as in the docs not a second version that works too * fixed formatting * fixed formatting
- Loading branch information
1 parent
13eb331
commit a928e68
Showing
51 changed files
with
259 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,11 +71,7 @@ func messageWithHeaders(feedback *model.Feedback) *gomail.Message { | |
m.SetHeader("Reply-To", feedback.ReplyToEmail.String) | ||
} | ||
// Timestamp | ||
if feedback.Timestamp.Valid { | ||
m.SetDateHeader("Date", feedback.Timestamp.Time) | ||
} else { | ||
m.SetDateHeader("Date", time.Now()) | ||
} | ||
m.SetDateHeader("Date", feedback.Timestamp) | ||
// Subject | ||
if feedback.Recipient == "[email protected]" { | ||
versionString := "TCA" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ func fullFeedback() *model.Feedback { | |
Longitude: null.FloatFrom(0), | ||
AppVersion: null.StringFrom("TCA 10.2"), | ||
OsVersion: null.StringFrom("Android 10.0"), | ||
Timestamp: null.TimeFrom(time.Now()), | ||
Timestamp: time.Now(), | ||
} | ||
} | ||
|
||
|
@@ -49,7 +49,7 @@ func emptyFeedback() *model.Feedback { | |
Longitude: null.Float{}, | ||
AppVersion: null.String{}, | ||
OsVersion: null.String{}, | ||
Timestamp: null.Time{}, | ||
Timestamp: time.Now(), | ||
} | ||
} | ||
|
||
|
@@ -61,7 +61,7 @@ func TestHeaderInstantiationWithFullFeedback(t *testing.T) { | |
assert.Equal(t, []string{`"TUM Campus App" <[email protected]>`}, m.GetHeader("From")) | ||
assert.Equal(t, []string{fb.Recipient}, m.GetHeader("To")) | ||
assert.Equal(t, []string{"\"Erika Mustermann\" <[email protected]>"}, m.GetHeader("Reply-To")) | ||
assert.Equal(t, []string{fb.Timestamp.Time.Format(time.RFC1123Z)}, m.GetHeader("Date")) | ||
assert.Equal(t, []string{fb.Timestamp.Format(time.RFC1123Z)}, m.GetHeader("Date")) | ||
assert.Equal(t, []string{"Feedback via the TUM Campus App"}, m.GetHeader("Subject")) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.