Files
zjpb.net/templates/admin/apikey/create.html
Jowe 5cef0b94fd feat: 添加 API Key 发布功能
- 新增 ApiKey 模型,支持 API 密钥认证
- 添加 require_api_key 装饰器实现 API 认证
- 实现 5 个站点管理 API 接口 (GET/POST/PUT/DELETE)
- 添加后台 API Key 管理界面
- 添加数据库迁移脚本

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:50:03 +08:00

15 lines
420 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'admin/model/create.html' %}
{% block tail %}
{{ super() }}
<script>
document.addEventListener('DOMContentLoaded', function() {
// 创建成功后显示 API Key
{% if created_at and model and model.key %}
setTimeout(function() {
alert('API Key 已创建:\n\n{{ model.key }}\n\n请妥善保存此密钥只会显示一次');
}, 500);
{% endif %}
});
</script>
{% endblock %}