update
parent
5544627bc2
commit
fad111af71
|
@ -4,6 +4,7 @@ import (
|
|||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"kumoly.io/kumoly/app/server"
|
||||
"kumoly.io/kumoly/app/store"
|
||||
"kumoly.io/kumoly/app/util"
|
||||
|
@ -38,6 +39,18 @@ func (srv Service) Load() error {
|
|||
calApi.PUT("", ApiCalUpdate)
|
||||
calApi.DELETE("", ApiCalDelete)
|
||||
|
||||
//+-30day
|
||||
calApi.GET("ics/:cid", func(c *gin.Context) {
|
||||
cid := c.Param("cid")
|
||||
ics, err := ICS(cid,
|
||||
time.Now().Add(time.Hour*-720),
|
||||
time.Now().Add(time.Hour*720))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
c.String(200, ics)
|
||||
})
|
||||
|
||||
eventApi := server.API.Group("event")
|
||||
eventApi.GET("", ApiEventQuery)
|
||||
eventApi.POST("", ApiEventNew)
|
||||
|
|
Loading…
Reference in New Issue