@@ -21,6 +21,7 @@ import { HolidayService } from 'src/holiday/holiday.service';
21
21
import { createRotation } from './utils/rotation' ;
22
22
import { FindTodayRotationDto } from './dto/find-today-rotation.dto' ;
23
23
import { FindRegistrationDto } from './dto/find-registration.dto' ;
24
+ import { FindAllRotationDto } from './dto/find-all-rotation.dto' ;
24
25
25
26
function getRotationCronTime ( ) {
26
27
if ( process . env . NODE_ENV === 'production' ) {
@@ -225,19 +226,7 @@ export class RotationsService {
225
226
}
226
227
227
228
const intraIdRecord = await this . userService . findOneById ( userId ) ;
228
- // const modifiedRecord = {};
229
-
230
- // if (records.length == 0) {
231
- // modifiedRecord['year'] = year;
232
- // modifiedRecord['month'] = month;
233
- // modifiedRecord['attendLimit'] = [];
234
- // modifiedRecord['intraId'] = intraIdRecord.nickname;
235
- // } else {
236
- // modifiedRecord['year'] = records[0].year;
237
- // modifiedRecord['month'] = records[0].month;
238
- // modifiedRecord['attendLimit'] = records[0].attendLimit;
239
- // modifiedRecord['intraId'] = intraIdRecord.nickname;
240
- // }
229
+
241
230
let modifiedRecord : FindRegistrationDto ;
242
231
243
232
if ( records . length == 0 ) {
@@ -362,8 +351,8 @@ export class RotationsService {
362
351
* 기본적으로는 모든 로테이션을 반환.
363
352
* 만약 parameter로 month와 year가 들어오면, 해당 스코프에 맞는 레코드를 반환.
364
353
*/
365
- async findAllRotation ( year ?: number , month ?: number ) : Promise < Partial < RotationEntity > [ ] > {
366
- let records : Promise < Partial < RotationEntity > [ ] > ;
354
+ async findAllRotation ( year ?: number , month ?: number ) : Promise < FindAllRotationDto [ ] > {
355
+ let records : Promise < RotationEntity [ ] > ;
367
356
368
357
if ( year && month ) {
369
358
records = this . rotationRepository . find ( {
0 commit comments