Fix login JSON errors and WebGIS02 rendering

This commit is contained in:
2026-06-11 16:10:45 +07:00
parent b3cacf6432
commit ad5a82ca36
4 changed files with 92 additions and 33 deletions
+6 -4
View File
@@ -94,10 +94,12 @@ switch ($method) {
default: jsonError('Method tidak diizinkan',405);
}
function jsonError($msg,$code=400){
http_response_code($code);
echo json_encode(['success'=>false,'message'=>$msg]);
exit;
if (!function_exists('jsonError')) {
function jsonError($msg,$code=400){
http_response_code($code);
echo json_encode(['success'=>false,'message'=>$msg]);
exit;
}
}
// ═══════════════════════════════════════════════════════════════