Apachai.Apachai.Index C# (CSharp) Method

Index() private method

private Index ( IManosContext ctx ) : void
ctx IManosContext
return void
        public void Index(IManosContext ctx)
        {
            string id = ctx.Request.Cookies.Get ("apachai:userId");
            string token = ctx.Request.Cookies.Get ("apachai:token");
            long uid;

            if (string.IsNullOrEmpty (id) || !long.TryParse (id, out uid) || !store.DoWeKnowUser (uid, token))
                ctx.Response.Redirect ("/Login");

            HttpServing (ctx, HtmlPaths.PostPage);
        }