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); }
public async Task<Response> Show(Request request) { return new NotFoundResponse(); }
public async Task<Response> List(Request request) { var repo = request.Repository; return new ViewResponse("ApiKeyList", new { ApiKeys = await repo.ApiKeys }); }