MCPcopy Create free account
hub / github.com/error311/FileRise / fr_pro_json

Function fr_pro_json

public/api/pro/_common.php:25–38  ·  view source on GitHub ↗

* @param array $payload */

(int $status, array $payload)

Source from the content-addressed store, hash-verified

23 * @param array<string,mixed> $payload
24 */
25 function fr_pro_json(int $status, array $payload): void
26 {
27 fr_pro_bootstrap();
28
29 http_response_code($status);
30 header('Content-Type: application/json; charset=utf-8');
31 $json = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
32 if (!is_string($json) || $json === '') {
33 http_response_code(500);
34 $json = '{"ok":false,"error":"JSON encode failed"}';
35 }
36 echo $json;
37 exit;
38 }
39}
40
41if (!function_exists('fr_pro_read_json')) {

Callers 15

fr_pro_guard_methodFunction · 0.85
fr_pro_require_activeFunction · 0.85
fr_pro_emit_resultFunction · 0.85
save.phpFile · 0.85
list.phpFile · 0.85
exportCsv.phpFile · 0.85
list.phpFile · 0.85
delete.phpFile · 0.85
select.phpFile · 0.85

Calls 1

fr_pro_bootstrapFunction · 0.85

Tested by

no test coverage detected