Fix #2785: Allow changing API key; require password to view or change key.
This commit is contained in:
9
app/views/maintenance/user/api_keys/update.js.erb
Normal file
9
app/views/maintenance/user/api_keys/update.js.erb
Normal 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 %>
|
||||
Reference in New Issue
Block a user