kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Use user ID of currently logged in user
rodzic
53bff389c3
commit
b19f9d5ecc
|
@ -1,8 +1,9 @@
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import ssoauth from './ssoauth.js'
|
import ssoauth from './ssoauth.js'
|
||||||
|
import utils from './utils.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ssoauth],
|
mixins: [ssoauth, utils],
|
||||||
methods: {
|
methods: {
|
||||||
loadActivations (callsign) {
|
loadActivations (callsign) {
|
||||||
return axios.get(process.env.VUE_APP_API_URL + '/activations/' + callsign)
|
return axios.get(process.env.VUE_APP_API_URL + '/activations/' + callsign)
|
||||||
|
@ -56,7 +57,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-db2.sota.org.uk/logs/activator/8877/' + new Date().getUTCFullYear() + '/1')
|
return this.axiosAuth.get('https://api-db2.sota.org.uk/logs/activator/' + this.myUserId + '/' + new Date().getUTCFullYear() + '/1')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
let myActivatedSummitsThisYear = new Set()
|
let myActivatedSummitsThisYear = new Set()
|
||||||
response.data.forEach(ent => {
|
response.data.forEach(ent => {
|
||||||
|
|
Ładowanie…
Reference in New Issue