Esempio n. 1
0
File: util.go Progetto: gingi/Shock
func ResourceDescription(cx *goweb.Context) {
	LogRequest(cx.Request)
	host := ""
	if strings.Contains(cx.Request.Host, ":") {
		split := strings.Split(cx.Request.Host, ":")
		host = split[0]
	} else {
		host = cx.Request.Host
	}
	r := resource{
		R: []string{"node", "user"},
		U: "http://" + host + ":" + fmt.Sprint(conf.APIPORT) + "/",
		D: "http://" + host + ":" + fmt.Sprint(conf.SITEPORT) + "/",
		C: conf.ADMINEMAIL,
		I: "Shock",
		T: "Shock",
	}
	cx.WriteResponse(r, 200)
}