Ejemplo n.º 1
0
    public JsonResult Getfetch(string email)
    {
        Globals.logger.LogInformation("Entering 'fetch' using email: " + email);
        Globals.logger.LogInformation(Globals.appSecret);
        if (!CheckAuth(Globals.appSecret))
        {
            return(Json(invalidAuthToken));
        }

        Client client = AWSDynamoDB.FetchItem(email).Result;

        if (client == null)
        {
            return(Json(new { }));
        }
        else
        {
            JObject jobject = (JObject)JToken.FromObject(client);
            return(Json(jobject));
        }
    }     // end [HttpGet("fetch")]