Ejemplo n.º 1
0
        public IActionResult Post([FromBody] CharacterTFR character, GrimoireContext db)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            string user = Request.Cookies["auth"];

            return(BadRequest("your bad"));
        }
Ejemplo n.º 2
0
        public List <Grimoire.Models.Character> GetMyCharacters(GrimoireContext db)
        {
            string user = this.Request.Cookies["auth"];

            return(db.Characters.Where(c => c.User.Equals(user)).ToList());
        }