🔒 Update Challonge client credentials handling with refined property names and methods

This commit is contained in:
2026-01-29 21:24:37 +00:00
parent 80d4ff9044
commit db8c4fff2c

View File

@@ -368,14 +368,14 @@ const challongeOAuthRefreshedAt = computed(() => {
// Challonge Client Credentials // Challonge Client Credentials
const challengeClientCreds = useChallongeClientCredentials(); const challengeClientCreds = useChallongeClientCredentials();
const hasChallongeClientCredentials = computed( const hasChallongeClientCredentials = computed(
() => challengeClientCreds.isConfigured.value () => challengeClientCreds.hasCredentials.value
); );
const isChallongeClientCredentialsValid = computed( const isChallongeClientCredentialsValid = computed(
() => challengeClientCreds.isValid.value () => challengeClientCreds.isAuthenticated.value
); );
const challongeClientId = computed(() => challengeClientCreds.clientId.value); const challongeClientId = computed(() => challengeClientCreds.maskedClientId.value);
const challongeClientExpiresIn = computed( const challongeClientExpiresIn = computed(
() => challengeClientCreds.expiresIn.value () => challengeClientCreds.tokenInfo.value?.expiresIn
); );
const newClientId = ref(''); const newClientId = ref('');
const newClientSecret = ref(''); const newClientSecret = ref('');
@@ -446,7 +446,7 @@ function disconnectChallongeOAuth() {
function saveChallongeClientCredentials() { function saveChallongeClientCredentials() {
try { try {
challengeClientCreds.save(newClientId.value, newClientSecret.value); challengeClientCreds.saveCredentials(newClientId.value, newClientSecret.value);
newClientId.value = ''; newClientId.value = '';
newClientSecret.value = ''; newClientSecret.value = '';
successMessage.value = 'Client credentials saved!'; successMessage.value = 'Client credentials saved!';
@@ -458,7 +458,7 @@ function saveChallongeClientCredentials() {
function deleteChallongeClientCredentials() { function deleteChallongeClientCredentials() {
if (confirm('Delete client credentials?')) { if (confirm('Delete client credentials?')) {
challengeClientCreds.delete(); challengeClientCreds.clearCredentials();
successMessage.value = 'Client credentials deleted'; successMessage.value = 'Client credentials deleted';
setTimeout(() => (successMessage.value = ''), 3000); setTimeout(() => (successMessage.value = ''), 3000);
} }