diff options
Diffstat (limited to 'pages/api')
-rw-r--r-- | pages/api/design.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pages/api/design.php b/pages/api/design.php index 512677d..1894a75 100644 --- a/pages/api/design.php +++ b/pages/api/design.php @@ -51,4 +51,8 @@ switch ($_GET["type"]) { die("Invalid type"); } -file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $_GET["member"] . ".json", json_encode($designs));
\ No newline at end of file +file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $_GET["member"] . ".json", json_encode($designs)); + +while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $_GET["member"] . ".json")) === "") { + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $_GET["member"] . ".json", json_encode($designs)); +}
\ No newline at end of file |