Skip to content

Commit

Permalink
🐛 Fix issues with API server (#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
SPGoding authored Jan 4, 2025
1 parent a6bade8 commit 7e06912
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/api-server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 10 additions & 10 deletions docs/developer/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion packages/web-api-server/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`))
Expand Down

0 comments on commit 7e06912

Please sign in to comment.