Task #2952 » 03-askapi_closed.patch
| askbot/views/api_v1.py | ||
|---|---|---|
|
'text': question_post.text,
|
||
|
'tags': thread.tagnames.strip().split(),
|
||
|
'url': site_url(thread.get_absolute_url()),
|
||
|
'closed': thread.closed,
|
||
|
}
|
||
|
datum['author'] = {
|
||
|
'id': thread._question_post().author.id,
|
||
| ... | ... | |
|
'id': thread.last_activity_by.id,
|
||
|
'username': thread.last_activity_by.username
|
||
|
}
|
||
|
if thread.closed:
|
||
|
datum['closed_at'] = get_epoch_str(thread.closed_at)
|
||
|
datum['closed_by'] = {
|
||
|
'id': thread.closed_by.id,
|
||
|
'username': thread.closed_by.username
|
||
|
}
|
||
|
return datum
|
||
|
def get_answer_data(post):
|
||