Commit 637f9025 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add json error message

parent 99864688
......@@ -32,14 +32,18 @@ $id = param_integer('id');
$artefact = artefact_instance_from_id($id);
$renderedartefact = $artefact->render(FORMAT_ARTEFACT_LISTSELF, null);
log_debug($renderedartefact);
if (!$renderedartefact) {
json_reply('local', 'artefactnotrendered');
}
$result = array(
'data' => $renderedartefact,
'error' => false,
'message' => '',
'message' => 'artefactrendered',
);
log_debug($result);
json_headers();
print json_encode($result);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment