Skip to content

Commit

Permalink
feat: 단터디 컨트롤러에 신청하는 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
gutanbug committed Dec 26, 2023
1 parent 63b0995 commit 7c71063
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ public ResponseIdDto create(AppAuthentication auth,
return new ResponseIdDto(id);
}

/**
* 단터디 게시글 신청
*
* @param id 게시글 id
*/
@PostMapping("/{id}/enter")
@UserAuth
public void enter(AppAuthentication auth, @PathVariable @Valid Long id) {
studyService.enter(id, auth.getUserId(), auth.getUserRole());
}

/**
* 단터디 게시글 삭제
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
import com.dku.council.domain.like.model.LikeTarget;
import com.dku.council.domain.like.service.LikeService;
import com.dku.council.domain.post.model.dto.response.ResponsePage;
import com.dku.council.domain.with_dankook.model.WithDankookStatus;
import com.dku.council.domain.with_dankook.model.dto.list.SummarizedTradeDto;
import com.dku.council.domain.with_dankook.model.dto.request.RequestCreateTradeDto;
import com.dku.council.domain.with_dankook.model.dto.response.ResponseSingleTradeDto;
import com.dku.council.domain.with_dankook.model.entity.type.Trade;
import com.dku.council.domain.with_dankook.service.TradeService;
import com.dku.council.domain.with_dankook.service.WithDankookService;
import com.dku.council.global.auth.jwt.AppAuthentication;
import com.dku.council.global.auth.role.UserAuth;
import com.dku.council.global.model.dto.ResponseIdDto;
Expand All @@ -22,7 +19,6 @@
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@Tag(name = "단국 거래 게시판", description = "단국 거래 게시판 API")
@RestController
Expand Down

0 comments on commit 7c71063

Please sign in to comment.