summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-04-23 10:51:37 +0200
committerRaindropsSys <contact@minteck.org>2023-04-23 10:51:37 +0200
commitc4657e4509733699c0f26a3c900bab47e915d5a0 (patch)
treebe93d5a3403c5dddc1bf8cc18bb3eded706109bb /pages
parentb4bcb0912c5fe1c7f00c7ac76e5b67620781d3cc (diff)
downloadpluralconnect-c4657e4509733699c0f26a3c900bab47e915d5a0.tar.gz
pluralconnect-c4657e4509733699c0f26a3c900bab47e915d5a0.tar.bz2
pluralconnect-c4657e4509733699c0f26a3c900bab47e915d5a0.zip
Updated 5 files and added 2 files (automated)
Diffstat (limited to 'pages')
-rw-r--r--pages/api/fronter.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/pages/api/fronter.php b/pages/api/fronter.php
index 9ef5571..9f70fdc 100644
--- a/pages/api/fronter.php
+++ b/pages/api/fronter.php
@@ -105,6 +105,21 @@ switch ($type) {
break;
+ case "bottom":
+ if (!isset($index) || trim($index) === "" || !is_integer($index)) {
+ if ($index !== null) peh_error("Invalid index", 400);
+ }
+
+ $day = $list[$date];
+
+ if (!isset($day[$index])) {
+ if ($index !== null) peh_error("Index not found", 404);
+ }
+
+ moveElement($list[$date], $index, count($list[$date]) - 1);
+
+ break;
+
case "up":
if (!isset($index) || trim($index) === "" || !is_integer($index)) {
if ($index !== null) peh_error("Invalid index", 400);
@@ -120,6 +135,21 @@ switch ($type) {
break;
+ case "top":
+ if (!isset($index) || trim($index) === "" || !is_integer($index)) {
+ if ($index !== null) peh_error("Invalid index", 400);
+ }
+
+ $day = $list[$date];
+
+ if (!isset($day[$index])) {
+ if ($index !== null) peh_error("Index not found", 404);
+ }
+
+ moveElement($list[$date], $index, 0);
+
+ break;
+
default:
peh_error("Invalid type name", 400);
break;