mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
feat: enhance user API keys view and fix admin cost display
- Add deleted API keys display to user's My API Keys view - Show deleted status with gray indicator and "Deleted" badge - Display deletion date and hide delete button for deleted keys - Fix cost calculation in admin deleted API keys tab - Add getCostStats call to properly populate cost data - Support includeDeleted parameter in user API keys endpoint 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -118,9 +118,13 @@ export const useUserStore = defineStore('user', {
|
||||
},
|
||||
|
||||
// 🔑 获取用户API Keys
|
||||
async getUserApiKeys() {
|
||||
async getUserApiKeys(includeDeleted = false) {
|
||||
try {
|
||||
const response = await axios.get(`${API_BASE}/api-keys`)
|
||||
const params = {}
|
||||
if (includeDeleted) {
|
||||
params.includeDeleted = 'true'
|
||||
}
|
||||
const response = await axios.get(`${API_BASE}/api-keys`, { params })
|
||||
return response.data.success ? response.data.apiKeys : []
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch API keys:', error)
|
||||
|
||||
Reference in New Issue
Block a user