public ActionResult <IDictionary <long, string> > Get([FromQuery(Name = "apikey")] string apikey) { if (!ActiveClientStorage.IsClientAccepted(apikey)) { return(Forbid()); } return(ImageStorage.GetImages()); }
public ActionResult Delete([FromQuery(Name = "apikey")] string apikey) { if (apikey != "12345") { return(Forbid()); } ActiveClientStorage.Clear(); return(Ok()); }
public ActionResult Post([FromBody] string passKey) { if (ComputeSha256Hash(passKey) == HashedPassKey) { Ok(""); } var apiKey = ActiveClientStorage.AddClient(); return(Ok(apiKey)); }
public ActionResult <IList <string> > Clients() { return(ActiveClientStorage.GetDebug()); }