Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
fix pagination of cve page
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewtrask committed Jan 20, 2019
1 parent 755f098 commit a8083e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/assets/components/VulnerabilitiesComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div>
<h2 class="font-sans tracking-wide font-light text-4xl pb-4">PHP Vulnerabilities</h2>
<p class="font-sans tracking-wide font-light pb-4">PHP has had its share of vulnerabilities pop up. Check back here as we update this daily.</p>
<input class="mb-4 w-1/5 shadow appearance-none border rounded py-2 px-3 text-grey-darker leading-tight focus:outline-none focus:shadow-outline" id="search" type="text" placeholder="Search PHP Versions" v-model="search">
<input class="mb-4 w-1/5 shadow appearance-none border rounded py-2 px-3 text-grey-darker leading-tight focus:outline-none focus:shadow-outline" id="search" type="text" placeholder="Search CVEs" v-model="search">
<table class="w-full table-auto">
<thead>
<tr>
Expand Down Expand Up @@ -85,16 +85,16 @@
getVulnerabilities() {
axios.get('/api/vulnerabilities').then(response => {
this.vulnerabilities = response.data.data;
this.links = response.meta.pagination.links;
this.links = response.data.meta.pagination.links;
}).catch(err => {
console.log(err);
});
},
getPreviousPage() {
axios.get(this.links.prev).then(response => {
axios.get(this.links.previous).then(response => {
this.vulnerabilities = response.data.data;
this.links = response.meta.pagination.links;
this.links = response.data.meta.pagination.links;
this.currentPage = this.currentPage - 1;
}).catch(err => {
console.log(err);
Expand All @@ -104,7 +104,7 @@
getNextPage() {
axios.get(this.links.next).then(response => {
this.vulnerabilities = response.data.data;
this.links = response.meta.pagination.links;
this.links = response.data.meta.pagination.links;
this.currentPage = this.currentPage + 1;
}).catch(err => {
console.log(err);
Expand Down

0 comments on commit a8083e0

Please sign in to comment.