Skip to content

Commit

Permalink
feat : 태그 삭제 api 추가 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjijang authored Jul 8, 2024
1 parent 25a3319 commit f805ca7
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.springframework.data.domain.Sort
import org.springframework.data.web.PageableDefault
import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.web.bind.annotation.DeleteMapping
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.ModelAttribute
import org.springframework.web.bind.annotation.PathVariable
Expand Down Expand Up @@ -93,6 +94,17 @@ class AdminTagController(
return "tag/edit"
}

/**
* 태그 삭제
*/
@DeleteMapping("/{tagId}/delete")
fun delete(
@PathVariable tagId: Long,
): String {
tagService.delete(tagId)
return "redirect:/tag/list"
}

/**
* 태그 수정 처리
*/
Expand Down

0 comments on commit f805ca7

Please sign in to comment.