Moving api requests to another controller.

This commit is contained in:
krzysiej
2022-06-06 14:27:02 +02:00
parent 314f4f2a14
commit f715f401e1
5 changed files with 36 additions and 24 deletions

View File

@@ -53,13 +53,13 @@ export default {
},
methods: {
search: function () {
axios.get('/book/search/' + this.searchTerm).then(response => {
axios.get('/online/search/' + this.searchTerm).then(response => {
this.books = response.data;
});
},
getBookDetails: function (url) {
this.manualMode = true;
axios.get('/book/info/' + btoa(url)).then(response => {
axios.get('/online/info/' + btoa(url)).then(response => {
const book = this.selectedBook = response.data;
this.$el.querySelector('#book_title').value = book.title;
this.$el.querySelector('#book_author').value = book.author;