mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added API to get-userdata for saper
This commit is contained in:
@@ -134,7 +134,8 @@
|
||||
import ChatComponent from "@/components/ChatComponent.vue";
|
||||
import AsideBarElement from "@/components/AsidebarComponent.vue";
|
||||
import HeaderElementPage from "@/components/HeaderComponent.vue";
|
||||
import { GetPercentageSteps } from "@/assets/js/games/saper/SaperAPI";
|
||||
import { GetPercentageSteps, GetUserData } from "@/assets/js/games/saper/SaperAPI";
|
||||
import { GetCookie } from "@/assets/js/storage/CookieStorage";
|
||||
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||
import 'swiper/css';
|
||||
@@ -185,6 +186,22 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const AUTHTOKEN = GetCookie('AUTHTOKEN')
|
||||
const SEARCHTOKEN = GetCookie('SearchToken')
|
||||
|
||||
if (AUTHTOKEN !== null && SEARCHTOKEN !== null) {
|
||||
try {
|
||||
await GetUserData(AUTHTOKEN, SEARCHTOKEN)
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
})
|
||||
}
|
||||
catch (e) {
|
||||
console.error('Error in GetData', e)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
flipCard(index) {
|
||||
if (this.flippedCards.includes(index)) {
|
||||
|
||||
Reference in New Issue
Block a user