13 lines
369 B
PHP
13 lines
369 B
PHP
<?php
|
|
|
|
require_once "lib/meme.php";
|
|
|
|
function endpoint($endpoint_data): array
|
|
{
|
|
|
|
return match ($endpoint_data["action"]) {
|
|
"addMeme" => addMeme($endpoint_data['memetitle'], $endpoint_data['memetext'], $endpoint_data['imageid']),
|
|
"renderGallery" => renderMemeGallery(),
|
|
default => ["Status" => "Fail", "message" => "Invalid action"],
|
|
};
|
|
} |