1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 05:58:14 +03:00

url shortener addons

This commit is contained in:
Anton Afanasyeu
2026-06-11 21:43:18 +02:00
parent 66d66e6b46
commit f70d7814c8
10 changed files with 570 additions and 2 deletions

View 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);