Switch those requests to api-db2 that have already required authentication before

(to maintain public/not-logged-in access to the list of activations for activator details pages)
buefy-0.9
Manuel Kasper 2023-09-28 11:22:20 +02:00
rodzic 0434400726
commit 53bff389c3
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -11,13 +11,13 @@ export default {
}) })
}, },
loadActivationDetails (activationId) { loadActivationDetails (activationId) {
return this.axiosAuth.get('https://api-db.sota.org.uk/admin/secure/my_activator_log_detailed', { params: { id: this.activationId } }) return this.axiosAuth.get('https://api-db2.sota.org.uk/logs/activation/detailed/' + this.activationId)
.then(response => { .then(response => {
return response.data[0] return response.data[0]
}) })
}, },
loadS2SLog (userId, year) { loadS2SLog (userId, year) {
return this.axiosAuth.get('https://api-db.sota.org.uk/admin/secure/s2s_log_by_id', { params: { id: userId, year } }) return this.axiosAuth.get('https://api-db2.sota.org.uk/logs/s2s/' + userId + '/' + year + '/1')
.then(response => { .then(response => {
return response.data return response.data
}) })
@ -56,7 +56,7 @@ export default {
if (this.$store.state.myActivatedSummitsThisYear) { if (this.$store.state.myActivatedSummitsThisYear) {
return Promise.resolve(this.$store.state.myActivatedSummitsThisYear) return Promise.resolve(this.$store.state.myActivatedSummitsThisYear)
} else { } else {
return this.axiosAuth.get('https://api-db.sota.org.uk/admin/secure/my_activator_log', { params: { year: new Date().getUTCFullYear() } }) return this.axiosAuth.get('https://api-db2.sota.org.uk/logs/activator/8877/' + new Date().getUTCFullYear() + '/1')
.then(response => { .then(response => {
let myActivatedSummitsThisYear = new Set() let myActivatedSummitsThisYear = new Set()
response.data.forEach(ent => { response.data.forEach(ent => {