Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix issues with API server #1709

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading