mirror of
git://f0xx.org/android_cast
synced 2026-07-29 05:58:14 +03:00
url shortener addons
This commit is contained in:
27
backend/url-shortener/public/index.php
Normal file
27
backend/url-shortener/public/index.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* URL shortener front controller (stub).
|
||||
* Routes: /api/v1/health, /api/v1/shorten, /api/v1/qr/{slug}.png, /{slug}
|
||||
* Full implementation tracked in docs/specs/20100611_3_url_shortener.md
|
||||
*/
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
$uri = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/';
|
||||
|
||||
if ($uri === '/api/v1/health') {
|
||||
echo json_encode([
|
||||
'status' => 'stub',
|
||||
'service' => 'url-shortener',
|
||||
'message' => 'PHP handlers not deployed yet — see backend/url-shortener/README.md',
|
||||
], JSON_UNESCAPED_SLASHES);
|
||||
exit;
|
||||
}
|
||||
|
||||
http_response_code(501);
|
||||
echo json_encode([
|
||||
'code' => 'NOT_IMPLEMENTED',
|
||||
'desc' => 'url-shortener API stub — deploy implementation from git://f0xx.org/androicast_project/url-shortener',
|
||||
], JSON_UNESCAPED_SLASHES);
|
||||
Reference in New Issue
Block a user