Include created history url in json rendered by histories API on successful history creation. Dannon verified this is the desired behvaior in the comments on issue 802 in bitbucket.

This commit is contained in:
John Chilton
2012-08-22 17:05:53 -05:00
parent f9b2eb2438
commit 508649e409
+1
View File
@@ -109,6 +109,7 @@ class HistoriesController( BaseAPIController, UsesHistoryMixin ):
trans.sa_session.add( new_history )
trans.sa_session.flush()
item = new_history.get_api_value(view='element', value_mapper={'id':trans.security.encode_id})
item['url'] = url_for( 'history', id=item['id'] )
return item
@web.expose_api