diff options
author | Minteck <contact@minteck.org> | 2023-01-21 21:59:38 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-01-21 21:59:38 +0100 |
commit | 78003af142c7c851ee14dbafecaa47954e07a8c2 (patch) | |
tree | fd90580202886a141a029755da3a83eaaad41b63 | |
parent | 3c61f1fa437cac2ee473b36518311a450efe12f1 (diff) | |
download | pluralconnect-78003af142c7c851ee14dbafecaa47954e07a8c2.tar.gz pluralconnect-78003af142c7c851ee14dbafecaa47954e07a8c2.tar.bz2 pluralconnect-78003af142c7c851ee14dbafecaa47954e07a8c2.zip |
Updated api/desktop-app.php (automated)
-rw-r--r-- | api/desktop-app.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api/desktop-app.php b/api/desktop-app.php index 20b1da9..2d0f0bf 100644 --- a/api/desktop-app.php +++ b/api/desktop-app.php @@ -34,6 +34,11 @@ if (isset($_GET["config"])) { } if ($proceed) { + if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/app-usage.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/app-usage.json", "{}"); + $usage = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/app-usage.json"), true); + $usage[$_GET['id']] = date('c'); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/app-usage.json", json_encode($usage)); + $data = $keys[$_GET["id"]]["config"] ?? []; } } else { |