Skip to content

Commit

Permalink
Merge pull request #3 from sdfgx123/hotfix/#1
Browse files Browse the repository at this point in the history
[Fix] WAS & Redis 연결 이슈로 인한 Redis 미사용 API 임시 추가 및 연결
  • Loading branch information
sdfgx123 authored Nov 12, 2023
2 parents d474f20 + 05415a1 commit 33969f2
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
import com.fc.mini3server._core.utils.ApiUtils;
import com.fc.mini3server.domain.Schedule;
import com.fc.mini3server.domain.CategoryEnum;
import com.fc.mini3server.domain.User;
import com.fc.mini3server.dto.UserResponseDTO;
import com.fc.mini3server.service.ScheduleService;
import com.fc.mini3server.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -95,6 +92,13 @@ public ResponseEntity<?> deleteAnnualSchedule(@RequestParam Long id) {

@PostMapping("/on")
public ResponseEntity<ApiUtils.ApiResult<String>> startWork() {
Long userId = userService.getUser().getId();
scheduleService.startWork(userId);
return ResponseEntity.ok(ApiUtils.success(null));
}

@PostMapping("/on/redis")
public ResponseEntity<ApiUtils.ApiResult<String>> startWorkUsingRedis() {
Long userId = userService.getUser().getId();
scheduleService.startWorkUsingRedis(userId);
return ResponseEntity.ok(ApiUtils.success(null));
Expand Down

0 comments on commit 33969f2

Please sign in to comment.