diff --git a/ansible/roles/api-server/tasks/main.yml b/ansible/roles/api-server/tasks/main.yml index fa8f30a33..d8d6c9a13 100644 --- a/ansible/roles/api-server/tasks/main.yml +++ b/ansible/roles/api-server/tasks/main.yml @@ -48,7 +48,7 @@ - name: Create nginx reverse proxy become: true ansible.builtin.template: - src: weblate.conf + src: api-server.conf dest: /etc/nginx/conf.d/api-server.conf mode: '644' notify: Reload nginx diff --git a/docs/developer/api.adoc b/docs/developer/api.adoc index a2a3042b3..9fbd5a4e5 100644 --- a/docs/developer/api.adoc +++ b/docs/developer/api.adoc @@ -7,8 +7,8 @@ == Introduction The Spyglass API provides access to various information that is helpful for data pack/resource pack -toolings. It uses https://github.com/misode/mcmeta:[misode/mcmeta] and -https://github.com/SpyglassMC/vanilla-mcdoc:[SpyglassMC/vanilla-mcdoc] under the hood and provides a +toolings. It uses https://github.com/misode/mcmeta[misode/mcmeta] and +https://github.com/SpyglassMC/vanilla-mcdoc[SpyglassMC/vanilla-mcdoc] under the hood and provides a few advantages over using the GitHub API directly: * Accessible within mainland China. @@ -60,21 +60,21 @@ before trying again. == Endpoints -=== `GET` https://api.spyglassmc.com/mcje/versions:[`/mcje/versions`] +=== `GET` https://api.spyglassmc.com/mcje/versions[`/mcje/versions`] -=== `GET` https://api.spyglassmc.com/mcje/versions/:version/block_states:[`/mcje/versions/:version/block_states`] +=== `GET` https://api.spyglassmc.com/mcje/versions/:version/block_states[`/mcje/versions/:version/block_states`] -=== `GET` https://api.spyglassmc.com/mcje/versions/:version/commands:[`/mcje/versions/:version/commands`] +=== `GET` https://api.spyglassmc.com/mcje/versions/:version/commands[`/mcje/versions/:version/commands`] -=== `GET` https://api.spyglassmc.com/mcje/versions/:version/registries:[`/mcje/versions/:version/registries`] +=== `GET` https://api.spyglassmc.com/mcje/versions/:version/registries[`/mcje/versions/:version/registries`] -=== `GET` https://api.spyglassmc.com/mcje/versions/:version/vanilla-assets-tiny/tarball:[`/mcje/versions/:version/vanilla-assets-tiny/tarball`] +=== `GET` https://api.spyglassmc.com/mcje/versions/:version/vanilla-assets-tiny/tarball[`/mcje/versions/:version/vanilla-assets-tiny/tarball`] -=== `GET` https://api.spyglassmc.com/mcje/versions/:version/vanilla-data/tarball:[`/mcje/versions/:version/vanilla-data/tarball`] +=== `GET` https://api.spyglassmc.com/mcje/versions/:version/vanilla-data/tarball[`/mcje/versions/:version/vanilla-data/tarball`] -=== `GET` https://api.spyglassmc.com/vanilla-mcdoc/symbols:[`/vanilla-mcdoc/symbols`] +=== `GET` https://api.spyglassmc.com/vanilla-mcdoc/symbols[`/vanilla-mcdoc/symbols`] -=== `GET` https://api.spyglassmc.com/vanilla-mcdoc/tarball:[`/vanilla-mcdoc/tarball`] +=== `GET` https://api.spyglassmc.com/vanilla-mcdoc/tarball[`/vanilla-mcdoc/tarball`] === `POST` `/hooks/github` diff --git a/packages/web-api-server/src/utils.ts b/packages/web-api-server/src/utils.ts index bb71de727..1937de16b 100644 --- a/packages/web-api-server/src/utils.ts +++ b/packages/web-api-server/src/utils.ts @@ -68,7 +68,7 @@ export async function initGitRepos(rootDir: string) { `https://github.com/${owner}/${repo}.git`, path.join(rootDir, repoDirName), singleBranch - ? ['--single-branch', `--branch ${singleBranch}`, '--progress'] + ? ['--single-branch', `--branch=${singleBranch}`, '--progress'] : ['--progress'], ) console.info(chalk.green(`Repo ${owner}/${repoDirName} cloned.`))