11 lines
367 B
PHP
11 lines
367 B
PHP
<?php
|
|
|
|
require_once "lib/survey.php";
|
|
|
|
function endpoint($endpoint_data): array
|
|
{
|
|
return match ($endpoint_data["action"]) {
|
|
"surveySubmit" => submitSurvey($endpoint_data["satisfaction"], $endpoint_data["functionality"], $endpoint_data["content"], $endpoint_data["comment"]),
|
|
default => ["Status" => "Fail", "message" => "Invalid action"],
|
|
};
|
|
} |