fix : delete apiTest file.
This commit is contained in:
31
.github/workflows/apiTest.yml
vendored
31
.github/workflows/apiTest.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: auto API test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
real-world-api-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: chmod test file
|
||||
run: chmod +x ./doc/run-api-tests.sh
|
||||
|
||||
- name: run api test
|
||||
run: ./doc/run-api-tests.sh
|
||||
@@ -24,7 +24,6 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -45,12 +44,12 @@ public class ArticleServiceImpl implements ArticleService {
|
||||
|
||||
@Override
|
||||
public List<ArticleResponse> getArticles(UserAuth userAuth, ArticleParam articleParam) {
|
||||
Pageable pageable = null;
|
||||
List<Article> articles = new ArrayList<>();
|
||||
|
||||
if (articleParam.getOffset() != null) {
|
||||
pageable = PageRequest.of(articleParam.getOffset(), articleParam.getLimit());
|
||||
}
|
||||
List<Article> articles = new ArrayList<>();
|
||||
Integer offset = articleParam.getOffset() == null ? 0 : articleParam.getOffset();
|
||||
Integer limit = articleParam.getLimit() == null ? 20 : articleParam.getLimit();
|
||||
|
||||
Pageable pageable = PageRequest.of(offset,limit);
|
||||
|
||||
if (articleParam.getTag() != null) {
|
||||
articles = articleRepository.findByTag(articleParam.getTag(), pageable);
|
||||
|
||||
Reference in New Issue
Block a user