Skip to content

Commit 4809b1f

Browse files
authored
Merge pull request #179 from osamhack2021/feature/backend/#178
Remove: response empty array instead of 404 error
2 parents 0533af4 + cfd3935 commit 4809b1f

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

backend/controllers/groupController.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ module.exports = {
1818

1919
const result = await groupService.search(req.query);
2020

21-
if(result.length < 1) throw new NotFoundError(`NotFound: 검색결과가 없습니다.`);
22-
2321
res.status(200).send(result);
2422
} catch(err) {
2523
res.status(err.status || 500).send(err.message);

backend/controllers/itemController.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ module.exports = {
2121

2222
const result = await itemService.search(req.query);
2323

24-
if(result.length < 1) throw new NotFoundError(`Not Found: 검색결과가 없습니다.`);
25-
2624
res.status(200).send(result);
2725

2826
} catch(err) {
@@ -39,8 +37,6 @@ module.exports = {
3937
filters: `status:"modified" AND NOT accessGroups.read:"${res.locals.group}"`
4038
});
4139

42-
if(result.hits.length < 1) throw new NotFoundError(`NotFound: 검색결과가 없습니다.`);
43-
4440
res.status(200).send(result.hits);
4541
} catch(err) {
4642
res.status(err.status || 500).send(err.message);

0 commit comments

Comments
 (0)