Esempio n. 1
0
        public async Task<Response> Add(Request request)
        {
            var path = request.Path;
            var repo = request.Repository;
            var postData = request.Body;
            var json = await new StreamReader(postData).ReadToEndAsync();
            dynamic data = JObject.Parse(json);

            repo.AddApiKey(new ApiKey { Id = data.id, Secret = data.secret });

            return new SeeOtherResponse(request.Path);
        }
Esempio n. 2
0
 public async Task<Response> Show(Request request)
 {
     return new NotFoundResponse();
 }
Esempio n. 3
0
 public async Task<Response> List(Request request)
 {
     var repo = request.Repository;
     return new ViewResponse("ApiKeyList", new { ApiKeys = await repo.ApiKeys });
 }