Added response to every path
This commit is contained in:
parent
2dbf32cd9e
commit
1be0761358
5 changed files with 9 additions and 1 deletions
|
@ -17,6 +17,8 @@ class AddRecordTagBranch extends ApiBranch
|
||||||
$tag_name = $params->get("tag_name");
|
$tag_name = $params->get("tag_name");
|
||||||
|
|
||||||
addRecordTag($user_id, $tag_name);
|
addRecordTag($user_id, $tag_name);
|
||||||
|
|
||||||
|
respondStatus(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ class AddTagToRecordBranch extends ApiBranch
|
||||||
$tag_id = $params->get("tag_id");
|
$tag_id = $params->get("tag_id");
|
||||||
|
|
||||||
addTagToRecord($tag_id, $record_id);
|
addTagToRecord($tag_id, $record_id);
|
||||||
|
|
||||||
|
respondStatus(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ class EndRecordBranch extends ApiBranch
|
||||||
}
|
}
|
||||||
|
|
||||||
updateEndRecord($user_id, $params);
|
updateEndRecord($user_id, $params);
|
||||||
|
|
||||||
|
respondStatus(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ class RemoveTagFromRecordBranch extends ApiBranch
|
||||||
$tag_id = $params->get("tag_id");
|
$tag_id = $params->get("tag_id");
|
||||||
|
|
||||||
removeTagFromRecord($tag_id, $record_id);
|
removeTagFromRecord($tag_id, $record_id);
|
||||||
|
|
||||||
|
respondStatus(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
require_once(__DIR__."/jsonBuilder.inc.php");
|
require_once(__DIR__."/jsonBuilder.inc.php");
|
||||||
|
|
||||||
function defaultHeader()
|
function setDefaultHeader()
|
||||||
{
|
{
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
|
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
|
||||||
|
|
Loading…
Reference in a new issue