소스 검색

add comment

Shun Miyazawa 4 년 전
부모
커밋
5d7ee62012
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      packages/app/src/server/routes/apiv3/activity.ts

+ 2 - 0
packages/app/src/server/routes/apiv3/activity.ts

@@ -49,11 +49,13 @@ module.exports = (crowi: Crowi): Router => {
 
       const query = {};
 
+      // add action to query
       const canContainActionFilterToQuery = parsedSearchFilter.action.every(a => AllSupportedActionType.includes(a));
       if (canContainActionFilterToQuery) {
         Object.assign(query, { action: parsedSearchFilter.action });
       }
 
+      // add date to query
       const startDate = parse(parsedSearchFilter.date.startDate, 'yyyy/MM/dd', new Date());
       const endDate = parse(parsedSearchFilter.date.endDate, 'yyyy/MM/dd', new Date());
       if (isValid(startDate) && isValid(endDate)) {