pagination update

This commit is contained in:
leejinseok
2020-02-17 14:28:53 +09:00
parent eff2a8e911
commit 4fa1306791
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import axios from 'axios';
export default {
getArticles({page = 0, size = 10, q = ''}, authorization) {
getArticles({page, size, q = ''}, authorization) {
const options = {
url: '/api/articles',

View File

@@ -29,7 +29,7 @@ public class ArticleRepository {
return em.createNamedQuery("findAll", Article.class)
.setFirstResult(page * size)
.setMaxResults(page * size + size)
.setMaxResults(size)
.getResultList();
}