mirror of
https://github.com/KevinMidboe/seasoned.git
synced 2026-03-11 03:49:07 +00:00
Removed manual axios call for emojis. Now use the seasonedApi controller function getEmoji
This commit is contained in:
@@ -30,10 +30,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
|
||||||
import storage from '../storage.js'
|
import storage from '../storage.js'
|
||||||
import MoviesList from './MoviesList.vue'
|
import MoviesList from './MoviesList.vue'
|
||||||
import Settings from './Settings.vue'
|
import Settings from './Settings.vue'
|
||||||
|
import SeasonedButton from '@/components/ui/SeasonedButton.vue'
|
||||||
|
|
||||||
|
import { getEmoji } from '@/seasonedAPI.js'
|
||||||
// import CreatedLists from './CreatedLists.vue'
|
// import CreatedLists from './CreatedLists.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -61,18 +63,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
getNewEmoji(){
|
|
||||||
axios.get(`https://api.kevinmidboe.com/api/v1/emoji`)
|
|
||||||
.then(function(resp){
|
|
||||||
this.emoji = resp.data.emoji;
|
|
||||||
}.bind(this))
|
|
||||||
},
|
|
||||||
getUserInfo(){
|
getUserInfo(){
|
||||||
this.userName = localStorage.getItem('username');
|
this.userName = localStorage.getItem('username');
|
||||||
},
|
},
|
||||||
requestToken(){
|
|
||||||
eventHub.$emit('requestToken');
|
|
||||||
},
|
|
||||||
toggleSettings() {
|
toggleSettings() {
|
||||||
this.showSettings = this.showSettings ? false : true;
|
this.showSettings = this.showSettings ? false : true;
|
||||||
},
|
},
|
||||||
@@ -90,7 +83,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.userLoggedIn = true;
|
this.userLoggedIn = true;
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.getNewEmoji();
|
|
||||||
|
getEmoji()
|
||||||
|
.then(resp => this.emoji = resp.data.emoji )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user