Skip to content

Commit

Permalink
Merge pull request #32 from rkshaon/rkshaon
Browse files Browse the repository at this point in the history
updt: deployment
  • Loading branch information
rkshaon authored Sep 11, 2024
2 parents c32860c + 10cb605 commit 73d9bbd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sudo su
echo -e "${BLUE}Activating Virtual Environment${RESET}"
echo -e "${YELLOW}=======================================${RESET}"
source env/bin/activate
pip install -r requirements
pip install -r requirements.txt

echo -e "${BLUE}Migrating${RESET}"
echo -e "${YELLOW}=======================================${RESET}"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
...mapGetters(['allBooks', 'nextPage', 'previousPage']),
books () {
return this.allBooks
},
}
},
mounted () {
this.fetchBooks()
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/services/v1/bookAPIService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import axios from 'axios'
const API_BASE_URL = process.env.VUE_APP_BACKEND_URL

export default {
async fetchV1Books(url) {
const finalUrl = url || `${API_BASE_URL}/book/v1/?page_size=8`;
async fetchV1Books (url) {
const finalUrl = url || `${API_BASE_URL}/book/v1/?page_size=8`

try {
const response = await axios.get(finalUrl);
return response.data;
const response = await axios.get(finalUrl)
return response.data
} catch (error) {
console.error("Error fetching books:", error);
throw error;
console.error('Error fetching books:', error)
throw error
}
},
};
}
}
6 changes: 3 additions & 3 deletions frontend/src/store/modules/books.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export default {
state.books = books
},
SET_NEXT_PAGE (state, url) {
state.nextPageUrl = url;
state.nextPageUrl = url
},
SET_PREVIOUS_PAGE (state, url) {
state.previousPageUrl = url;
state.previousPageUrl = url
}
},
actions: {
async fetchBooks({ commit }, url = null) {
async fetchBooks ({ commit }, url = null) {
try {
const response = await bookAPIService.fetchV1Books(url)
commit('SET_BOOKS', response.results)
Expand Down

0 comments on commit 73d9bbd

Please sign in to comment.