Consolidates API route prefixes
Removes redundant "/api/v1" prefixes from API router definitions in the backend and updates the corresponding API calls in the frontend. This change streamlines the API structure and improves code maintainability. Additionally, adds console logs in the frontend to aid in debugging the API calls.
This commit is contained in:
parent
cd083114b4
commit
e95230c0f4
2 changed files with 24 additions and 18 deletions
|
|
@ -39,10 +39,12 @@ window.app = Vue.createApp({
|
|||
return 'Amount (sats) *'
|
||||
},
|
||||
currencyOptions() {
|
||||
console.log('Computing currencyOptions, this.currencies:', this.currencies)
|
||||
const options = [{label: 'Satoshis (default)', value: null}]
|
||||
this.currencies.forEach(curr => {
|
||||
options.push({label: curr, value: curr})
|
||||
})
|
||||
console.log('Currency options:', options)
|
||||
return options
|
||||
}
|
||||
},
|
||||
|
|
@ -90,8 +92,12 @@ window.app = Vue.createApp({
|
|||
'/castle/api/v1/currencies',
|
||||
this.g.user.wallets[0].inkey
|
||||
)
|
||||
console.log('Currencies API response:', response)
|
||||
console.log('Currencies data:', response.data)
|
||||
this.currencies = response.data
|
||||
console.log('this.currencies:', this.currencies)
|
||||
} catch (error) {
|
||||
console.error('Error loading currencies:', error)
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue