Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 1404eb0

Browse files
committed
Syntax bug fix
1 parent 5f5ed43 commit 1404eb0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/views/docs/main.phtml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
$versions = $this->getParam('versions', []);
3-
42
$clients = [
53
[
64
'title' => 'Getting Started for Web',
@@ -46,12 +44,13 @@ $clients = [
4644
],
4745
];
4846

49-
function getSpecsUrl($type, $platform) use ($versions) {
47+
$latestVersion = $this->getParam('latestVersion', 'latest');
48+
49+
$getSpecsUrl = function($type, $platform) use ($latestVersion) {
5050
// $type is 'swagger2' or 'open-api3'
5151
// $platform is 'client' or 'server'
52-
$version = $versions[0]['docs'];
5352

54-
return 'https://github.com/appwrite/appwrite/blob/master/app/config/specs/' . $type . '-' . $version . '-' . $platform . '.json';
53+
return 'https://github.com/appwrite/appwrite/blob/master/app/config/specs/' . $type . '-' . $latestVersion . '-' . $platform . '.json';
5554
}
5655

5756
?>

0 commit comments

Comments
 (0)