'Change the current user\'s current history to one with `id`.'

@web.json
def set_as_current(self, trans, id):

    trans.response.headers['Cache-Control'] = ['max-age=0', 'no-cache', 'no-store']
    try:
        history = self.history_manager.get_owned(self.decode_id(id), trans.user, current_history=trans.history)
        trans.set_history(history)
        return self.history_data(trans, history)
    except exceptions.MessageException as msg_exc:
        trans.response.status = msg_exc.err_code.code
        return {'err_msg': msg_exc.err_msg, 'err_code': msg_exc.err_code.code}
