update
parent
ce56a78f52
commit
3dabbb612f
|
@ -55,7 +55,7 @@ func init() {
|
||||||
|
|
||||||
func ICS(cal_id string, from time.Time, to time.Time) (string, error) {
|
func ICS(cal_id string, from time.Time, to time.Time) (string, error) {
|
||||||
cal := &Calendar{}
|
cal := &Calendar{}
|
||||||
store.DB.Preload("Events", "start > ? and end < ?", from, to).
|
store.DB.Preload("Events", `"start" > ? and "end" < ?`, from, to).
|
||||||
First(cal, "id = ?", cal_id)
|
First(cal, "id = ?", cal_id)
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
if err := tmpl.Execute(buf, cal); err != nil {
|
if err := tmpl.Execute(buf, cal); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue