Update: 2026-07-21 20:55:19
This commit is contained in:
@@ -87,11 +87,8 @@ function getNabehBearerToken(): ?string {
|
|||||||
'Content-Type: application/json'
|
'Content-Type: application/json'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$debugLog = "[ " . date('Y-m-d H:i:s') . " ]\n";
|
$debugLog = "[Nabeh Auth Debug] Request: $apiUrl | Response: $response";
|
||||||
$debugLog .= "Request to: $apiUrl\n";
|
error_log($debugLog);
|
||||||
$debugLog .= "Payload: " . json_encode($payload) . "\n";
|
|
||||||
$debugLog .= "Response: " . $response . "\n";
|
|
||||||
file_put_contents(__DIR__ . '/../../../logs/nabeh_debug.txt', $debugLog, FILE_APPEND);
|
|
||||||
|
|
||||||
if ($response) {
|
if ($response) {
|
||||||
$decoded = json_decode($response, true);
|
$decoded = json_decode($response, true);
|
||||||
@@ -102,8 +99,7 @@ function getNabehBearerToken(): ?string {
|
|||||||
if ($redis) {
|
if ($redis) {
|
||||||
try {
|
try {
|
||||||
$redis->setex('nabeh_bearer_token', 86400, $token);
|
$redis->setex('nabeh_bearer_token', 86400, $token);
|
||||||
$debugLog = "Token cached in Redis successfully.\n";
|
error_log("[Nabeh Auth Debug] Token cached in Redis successfully.");
|
||||||
file_put_contents(__DIR__ . '/../../../logs/nabeh_debug.txt', $debugLog, FILE_APPEND);
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$msg = "⚠️ [Nabeh Auth Redis Cache Save] Error saving token: " . $e->getMessage();
|
$msg = "⚠️ [Nabeh Auth Redis Cache Save] Error saving token: " . $e->getMessage();
|
||||||
error_log($msg);
|
error_log($msg);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import '../../constant/char_map.dart';
|
|||||||
import '../../constant/colors.dart';
|
import '../../constant/colors.dart';
|
||||||
import '../../constant/info.dart';
|
import '../../constant/info.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
|
import 'encrypt_decrypt.dart';
|
||||||
|
|
||||||
class ImageController extends GetxController {
|
class ImageController extends GetxController {
|
||||||
File? myImage;
|
File? myImage;
|
||||||
|
|||||||
Reference in New Issue
Block a user