Exemple #1
0
func (c Index) IndexAction() {

	c.Data["version"] = config.Config.Version

	//
	if !idclient.SessionIsLogin(c.Session) {
		c.Redirect(idclient.AuthServiceUrl(
			config.Config.InstanceID,
			fmt.Sprintf("//%s%s/auth/cb", c.Request.Host, config.HttpSrvBasePath("")),
			c.Request.RawAbsUrl()))
		return
	}

	//
	c.Data["pandora_endpoint"] = config.Config.PandoraEndpoint
}
Exemple #2
0
func (c Pod) IndexAction() {

	c.Data["version"] = config.Config.Version

	//
	if !idclient.SessionIsLogin(c.Session) {
		c.Redirect(idclient.AuthServiceUrl(
			config.Config.InstanceID,
			fmt.Sprintf("//%s%s/auth/cb", c.Request.Host, config.HttpSrvBasePath("")),
			c.Request.RawAbsUrl()))
		return
	}

	//
	c.Data["pandora_endpoint"] = config.Config.PandoraEndpoint
	c.Data["l9r_pod_active"] = c.Params.Get("pod_id")

	c.Render("index/index.tpl")
}