test/post-test.php
author durandn
Tue, 22 Sep 2015 17:07:58 +0200
changeset 1062 f8adaa2caecb
parent 931 0fdce6e14748
permissions -rw-r--r--
CurrentSegmentInfobox: fixed bug where editing a segment would not update the source correctly and mess up other widgets.

<?php

$data = json_decode(file_get_contents("php://input"));

if (!isset($data->annotations[0]->id)) {
    $data->annotations[0]->id = uniqid("annotation_");
}

if (!isset($data->annotations[0]->type)) {
    $data->annotations[0]->type = uniqid("annotationType_");
}

print_r(json_encode($data));

?>