From 696bba21b9987a767d166f84fced49faa713a623 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Sat, 18 May 2024 17:49:55 +0300 Subject: [PATCH] Added backends/spec API endpoint. --- src/API/Backends/Spec.php | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/API/Backends/Spec.php diff --git a/src/API/Backends/Spec.php b/src/API/Backends/Spec.php new file mode 100644 index 00000000..fe643f5c --- /dev/null +++ b/src/API/Backends/Spec.php @@ -0,0 +1,40 @@ + $spec['key'], + 'type' => $spec['type'], + 'description' => $spec['description'], + ]; + + if (ag_exists($spec, 'choices')) { + $item['choices'] = $spec['choices']; + } + + $list[] = $item; + } + + return api_response(HTTP_STATUS::HTTP_OK, $list); + } +}