Пример #1
0
 public Async.Task <HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Anonymous, "GET", "PATCH", "POST", "DELETE")] HttpRequestData req)
 {
     return(_auth.CallIfUser(req, r => r.Method switch {
         "GET" => Get(r),
         "POST" => Post(r),
         "DELETE" => Delete(r),
         _ => throw new InvalidOperationException("Unsupported HTTP method"),
     }));
Пример #2
0
 public Async.Task <HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Anonymous, "GET", "POST", "DELETE")] HttpRequestData req)
 => _auth.CallIfUser(req, r => r.Method switch {
     "GET" => Get(r),
     "DELETE" => Delete(r),
Пример #3
0
 public Async.Task <HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Anonymous, "POST", Route = "node/add_ssh_key")] HttpRequestData req)
 {
     return(_auth.CallIfUser(req, r => r.Method switch {
         "POST" => Post(r),
         _ => throw new InvalidOperationException("Unsupported HTTP method"),
     }));
Пример #4
0
 public Async.Task <HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Anonymous, "GET")] HttpRequestData req)
 => _auth.CallIfUser(req, Get);