cronsun/web/configuration.go

20 lines
371 B
Go
Raw Normal View History

package web
import (
"net/http"
2017-05-09 10:27:32 +00:00
"github.com/shunfei/cronsun/conf"
)
2017-03-16 02:19:57 +00:00
type Configuration struct{}
func (cnf *Configuration) Configuratios(w http.ResponseWriter, r *http.Request) {
2017-03-16 02:19:57 +00:00
outJSON(w, struct {
Security *conf.Security `json:"security"`
2017-04-07 08:28:41 +00:00
Alarm bool `json:"alarm"`
2017-03-16 02:19:57 +00:00
}{
Security: conf.Config.Security,
2017-04-07 08:28:41 +00:00
Alarm: conf.Config.Mail.Enable,
2017-03-16 02:19:57 +00:00
})
}