<template>
    <div>
        <TitleBar/>
        <CreditLists></CreditLists>
    </div>
</template>

<script>
    import TitleBar from "@/components/TitleBar";
    import axios from 'axios'
    import CreditLists from "@/components/baruser/CreditLists";
    export default {
        name: "BarView",
        components: {CreditLists, TitleBar},
        created() {
            this.getUser()
        },
        methods: {
            getUser() {
                // eslint-disable-next-line no-console
                console.log(this.$store.getters.getToken)
                axios.get("http://localhost:5000/bar", {headers: {Token: this.$store.getters.getToken}})
                .then(response => {
                    // eslint-disable-next-line no-console
                    console.log(response.data)
                })
                .catch(error => {
                    // eslint-disable-next-line no-console
                    console.log(error)
                })
            }
        }
    }
</script>

<style scoped>

</style>
