Topic Merge

URI 에 입력된 pk에 해당하는 Topic을 data parameter에 입력된 pk에 해당하는 Topic에 Merge 시킵니다.

예를 들어,

topic_from 을 URI에 입력되는 pk의 Topic,

topic_to 를 data parameter에 입력되는 pk의 Topic 이라 했을 때,

topic_from에 전문가, Interest가 있었던 모든 사람들과 연결되어있던 Question들이 topic_to로 이전됩니다. Count 또한 업데이트 됩니다.

URL

/topic/merge/35/

Method

PUT

Data Params

Key Description Type Require
topic_to Merge 될 topic의 pk Int True

Merge is only for Staff

Topic Merge 는 일반 유저가 호출하는 것이 불가능합니다. Staff/SuperUser일 경우에만 실행할 수 있습니다.


Success Response

HTTP Status Code

200

Content

Key Description Type
pk Topic의 pk Int
url Topic Detail 페이지로의 링크 Str
creator Topic을 만든 유저의 Profile Detail 링크 str
name Topic의 이름 Str
description Topic에 대한 설명 Str
image Topic에 대한 썸네일 사진으로의 링크 Str
answer_count Topic과 관련된 답변의 개수 Int
question_count Topic과 관련된 질문의 개수 Int
expert_count Topic과 관련된 전문가 Follower수 Int
interest_count Topic과 관련된 관심 Follower수 Int
created_at 생성된 날짜 Date
modified_at 마지막으로 수정된 날짜 - 처음 생성되었을 때는 created_at과 같음 Date
{
    "pk": 30,
    "creator": 5,
    "name": "외교",
    "description": "",
    "image": null,
    "answer_count": 0,
    "question_count": 0,
    "expert_count": 1,
    "interest_count": 1,
    "created_at": "2017-12-09T01:58:08.342466+09:00",
    "modified_at": "2017-12-09T01:58:08.342491+09:00"
}

results matching ""

    No results matching ""