Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic Delete API #140

Open
JinHoooooou opened this issue Sep 8, 2021 · 0 comments
Open

Topic Delete API #140

JinHoooooou opened this issue Sep 8, 2021 · 0 comments
Assignees
Labels
API api 개발

Comments

@JinHoooooou
Copy link
Contributor

문제

Topic을 삭제할 수 있어야 한다.

해결

관리자 혹은 해당 topic의 owner가 생성된 Topic update issue의 승인 버튼을 눌렀을 때, 해당 topic의 title이 수정된다.

조건

  • 임의로 topic title을 삭제할 수 없다. 관리자 혹은 해당 topic owner의 승인이 있어야한다.
    • topic의 owner가 아니라면 수정할 수 없다.
  • topic delete issue가 있어야한다.

절차

  1. 생성된 Topic이 있고, topic의 owner일 때 Topic Delete Success 테스트 및 구현
  2. 생성된 Topic이 있고, topic의 owner가 아닐 때 Topic Delete Fail 테스트 및 구현
  3. swagger 등록 및 테스트

인수테스트

  1. 로그인
  2. Issue List 페이지로 이동한다.
  3. topic delete에 대한 issue를 클릭 후, 승인 버튼을 누른다.
  4. topic에 대한 권한이 있다면 topic이 삭제된다.
  5. topic에 대한 권한이 없다면 삭제되지 않는다.

명세

  • URL

    Header: Bearer {JWT_TOKEN}
    DELETE {BASE_URL}/api/topics/{topic_id}
  • Request

  • Response

    • 204 NO CONTENT

      {
      	"message": "삭제 되었습니다."
      }
    • 401 UNAUTHORIZED

      {
      	"message": "권한이 없습니다."
      }
@JinHoooooou JinHoooooou added the API api 개발 label Sep 8, 2021
@JinHoooooou JinHoooooou self-assigned this Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API api 개발
Projects
None yet
Development

No branches or pull requests

1 participant