Esempio n. 1
0
        public async void Accept([FromHeader] string auth, [FromForm] string friend)
        {
            string user;

            if ((user = JwtBuilder.UserJwtToken(auth).Result) == null || !UserStore.Exists(friend).Result ||
                !UserStore.Exists(user).Result)
            {
                HttpContext.Response.StatusCode = (int)HttpStatusCode.NotFound;
                return;
            }

            HttpContext.Response.Headers.Add("auth", auth);

            await UserStore.AcceptFriend(user, friend);
        }