using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using JtkMainServer.Managers;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace JtkMainServer.Pages.Join {
    public class DoneModel : PageModel {
        public IActionResult OnGet() {
            var loginUserId = HttpContext.Session.GetString("LoggedInUserId");
            ViewData["LoggedinUserId"] = loginUserId;
            //ViewData["UserTotalCash"] = DbManager.GetUser(loginUserId)?.Cash;

            if (string.IsNullOrWhiteSpace(loginUserId) ==  false) {
                return RedirectToPage("/Index");
            }

            return Page();
        }
        public IActionResult OnPost() {
            return OnGet();
        }
    }
}