public ActionResult <IDictionary <long, string> > Get([FromQuery(Name = "apikey")] string apikey)
        {
            if (!ActiveClientStorage.IsClientAccepted(apikey))
            {
                return(Forbid());
            }

            return(HealthValueStorage.GetHealthValues());
        }
        public ActionResult Delete([FromQuery(Name = "apikey")] string apikey)
        {
            if (apikey != "12345")
            {
                return(Forbid());
            }

            HealthValueStorage.ClearStorage();
            return(Ok());
        }
        public ActionResult Post([FromBody] string value, [FromQuery(Name = "apikey")] string apikey)
        {
            if (apikey != "666")
            {
                return(Forbid());
            }

            HealthValueStorage.AddNewValue(value);
            return(Ok());
        }
Exemple #4
0
 public ActionResult <IDictionary <long, string> > Values()
 {
     return(HealthValueStorage.GetDebug());
 }