mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
@@ -231,7 +231,7 @@ const renewApiKey = async () => {
|
|||||||
expiresAt: form.renewDuration === 'permanent' ? null : form.newExpiresAt
|
expiresAt: form.renewDuration === 'permanent' ? null : form.newExpiresAt
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await apiClient.put(`/admin/api-keys/${props.apiKey.id}/renew`, data)
|
const result = await apiClient.put(`/admin/api-keys/${props.apiKey.id}`, data)
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
showToast('API Key 续期成功', 'success')
|
showToast('API Key 续期成功', 'success')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import { apiClient } from '@/config/api'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { apiClient } from '@/config/api'
|
|
||||||
|
|
||||||
export const useApiKeysStore = defineStore('apiKeys', () => {
|
export const useApiKeysStore = defineStore('apiKeys', () => {
|
||||||
// 状态
|
// 状态
|
||||||
@@ -97,7 +97,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
error.value = null
|
error.value = null
|
||||||
try {
|
try {
|
||||||
const response = await apiClient.put(`/admin/api-keys/${id}/renew`, data)
|
const response = await apiClient.put(`/admin/api-keys/${id}`, data)
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
await fetchApiKeys()
|
await fetchApiKeys()
|
||||||
return response
|
return response
|
||||||
|
|||||||
Reference in New Issue
Block a user