wip showing failure state

This commit is contained in:
Paul Liverman III 2018-04-24 16:09:49 -07:00
parent b4387d6af4
commit 1646709f7e

View File

@ -29,12 +29,13 @@ function new_task() {
function new_api_key() {
$.get("/v1/key/new", function(data, status) {
let template = $("#api-key-template").html();
template = $(template);
$("code", template).text(data.api_key.key);
$("#new-api-key").before(template);
// $("#new-api-key").before("<li><div class='row'><div class='column column-80'><code>" + data.api_key.key + "</code></div><div class='column column-20'><button class='delete'>x</button></div></div></li>");
}).fail(function(a) {
console.log(a);
let template = $("#api-key-template").html();
template = $(template);
$("code", template).text("Failure!");
$("#new-api-key").before(template);
});