2017-03-09 03:39:06 +00:00
|
|
|
package web
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2017-05-09 10:27:32 +00:00
|
|
|
"github.com/shunfei/cronsun/conf"
|
2017-03-09 03:39:06 +00:00
|
|
|
)
|
|
|
|
|
2017-03-16 02:19:57 +00:00
|
|
|
type Configuration struct{}
|
2017-03-09 03:39:06 +00:00
|
|
|
|
|
|
|
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
|
|
|
})
|
2017-03-09 03:39:06 +00:00
|
|
|
}
|