mirror of
https://github.com/appwrite/appwrite
synced 2026-04-28 00:47:50 +00:00
- Upgrade utopia-php/cli from 0.15 to 0.22 - Upgrade utopia-php/analytics from 0.10 to 0.15 - Upgrade utopia-php/orchestration from 0.9 to 0.19 - Use dev branches for utopia-php/framework and utopia-php/platform - Remove utopia-php/swoole dependency (merged into framework) - Migrate Utopia\CLI\Console to Utopia\Console across all files - Migrate Utopia\Http to Utopia\Http\Http namespace - Migrate Utopia\Swoole\Files to Utopia\Http\Files (now instance-based) - Convert static CLI::setResource() calls to instance-based Dependency API - Fix StatsResources task named parameter mismatch
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Appwrite\Utopia\Response;
|
|
use Utopia\Config\Config;
|
|
use Utopia\Http\Http;
|
|
|
|
Http::get('/versions')
|
|
->desc('Get Version')
|
|
->groups(['home', 'web'])
|
|
->label('scope', 'public')
|
|
->inject('response')
|
|
->action(function (Response $response) {
|
|
$platforms = Config::getParam('sdks');
|
|
|
|
$versions = [
|
|
'server' => APP_VERSION_STABLE,
|
|
];
|
|
|
|
foreach ($platforms as $platform) {
|
|
$languages = $platform['sdks'] ?? [];
|
|
|
|
foreach ($languages as $key => $language) {
|
|
if (isset($language['dev']) && $language['dev']) {
|
|
continue;
|
|
}
|
|
|
|
if (isset($language['enabled']) && !$language['enabled']) {
|
|
continue;
|
|
}
|
|
|
|
$platformKey = $platform['key'] ?? '';
|
|
$languageKey = $language['key'] ?? '';
|
|
$version = $language['version'] ?? '';
|
|
$versions[$platformKey . '-' . $languageKey] = $version;
|
|
}
|
|
}
|
|
|
|
$response->json($versions);
|
|
});
|