Fix #2785: Allow changing API key; require password to view or change key.

This commit is contained in:
evazion
2016-12-17 22:32:01 -06:00
parent 3e285ea4ce
commit a92120e873
12 changed files with 201 additions and 78 deletions

View File

@@ -0,0 +1,9 @@
<% if @api_key.errors.any? %>
Danbooru.error("<%= j @api_key.errors.full_messages.join(', ') %>");
<% else %>
$("#api-key").text("<%= j @api_key.key %>");
$("#api-key-created").html("<%= j compact_time @api_key.created_at %>");
$("#api-key-updated").html("<%= j compact_time @api_key.updated_at %>");
Danbooru.notice("API key regenerated.");
<% end %>