forked from Adleraci/adlerka.top
Test
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once "lib/meme.php";
|
||||
|
||||
function endpoint($endpoint_data): array
|
||||
{
|
||||
|
||||
return match ($endpoint_data["action"]) {
|
||||
"addMeme" => addMeme($endpoint_data['meme_title'], $endpoint_data['meme_text'], $endpoint_data['meme_image_id']),
|
||||
"getMemes" => getMemeGallery($endpoint_data['offset'], $endpoint_data['meme_author'], $endpoint_data['meme_id'], $endpoint_data['meme_keyword']),
|
||||
"deleteMeme" => deleteMeme($endpoint_data['meme_id']),
|
||||
"getMemeVotes" => getMemeVotes($endpoint_data['meme_id']),
|
||||
"deleteVoteMeme" => deleteVoteMeme($endpoint_data['meme_id']),
|
||||
"voteMeme" => voteMeme($endpoint_data['meme_id'], $endpoint_data['is_upvote']),
|
||||
default => ["Status" => "Fail", "Message" => "Invalid action"],
|
||||
};
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
<?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"],
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user