documenting start case endpoint

This commit is contained in:
Fernando Ontiveros
2025-04-28 22:18:55 +00:00
parent 4d6378a34c
commit a30f6863e9
6 changed files with 125 additions and 28 deletions

View File

@@ -142,6 +142,15 @@ function ellipsis ($text, $numb)
return $text;
}
/* Looking for Content Process (seems to be a function semi deprecated:
The lookinginfor_content_process function takes a spro_uid as an argument.
It queries the Process table to check if a process with the given pro_uid exists. (This happens 99% of the time)
If a process is found, it does nothing. 99% of the time, this is the case.
If no process is found, it queries the Task table for tasks associated with the spro_uid and inserts their titles into the Content table.
It then queries the Process table again to get the process title and inserts it into the Content table.
Example Usage: The example at the bottom shows how to call the lookinginfor_content_process function.
*/
function lookinginforContentProcess ($sproUid)
{
$oContent = new Content();
@@ -238,7 +247,7 @@ function startCase()
// Print JSON response
ob_end_clean();
header('Content-Type: application/json');
header('Content-Type: application/json');
print (json_encode($newCase));
} catch (Exception $e) {
$newCase['status'] = 'failure';
@@ -262,4 +271,3 @@ function getDefaultDashboard ()
}
print_r( G::json_encode( $defaultDashboard ) );
}