Compare commits

..
Author SHA1 Message Date
54041297e6 Update dependency greenlet to v3.5.5 2026-08-10 20:39:49 +02:00
03c11b4462 Update dependency typing-inspection to v0.4.3 2026-08-10 09:47:35 +00:00
2933b3bba0 Update dependency starlette to v1.6.0 2026-08-08 21:34:13 +02:00
9625b1be62 Update dependency pg to v8.23.0 2026-08-08 19:33:41 +00:00
d4d6fd3d07 update domain 2026-08-08 21:17:43 +02:00
432931aab2 Update dependency starlette to v1.5.0 2026-08-08 13:20:07 +00:00
c696d306aa Update dependency pydantic-settings to v2.15.0 2026-08-07 09:47:49 +00:00
b299191514
feat: add team colours & battleResultRate to boss response 2026-08-06 09:03:52 +02:00
2b4e9ae7c0 Update dependency starlette to v1.4.1 2026-08-05 15:47:39 +00:00
a3571f971d Update dependency tweepy to v4.17.0 2026-08-05 12:33:23 +00:00
0cecc52a55 Update dependency fastapi to v0.141.1 2026-08-05 12:18:27 +00:00
d81f451963 Update dependency tzdata to v2026.3 2026-08-05 14:15:09 +02:00
014e59b234 Update dependency discord.js to v14.27.0 2026-08-05 14:14:58 +02:00
4e5d08b7fc Update dependency typing-extensions to v4.16.0 2026-08-05 14:14:43 +02:00
ddfacaf4a5 Update dependency cryptography to v50 2026-08-05 14:14:23 +02:00
702abc832d Update dependency uvicorn to v0.52.1 2026-08-05 14:14:20 +02:00
a90061f692 Update dependency starlette to v1.4.0 2026-08-05 09:48:00 +00:00
ad0cf39647 Update dependency charset-normalizer to v3.4.9 2026-08-05 04:19:07 +02:00
86792bc48e Update dependency certifi to v2026.7.22 2026-08-05 04:19:00 +02:00
8097e6f278 Update dependency express-rate-limit to v8.6.2 2026-08-05 02:03:26 +00:00
e37aa0dc37 Update dependency annotated-doc to v0.0.5 2026-08-05 00:18:20 +00:00
d42f74c81c Update actions/checkout action to v7 2026-08-05 02:06:06 +02:00
0b7b272117 Update dependency axios to v1.19.0 2026-08-05 02:06:00 +02:00
6f3bb98524 Update dependency click to v8.4.2 2026-08-05 02:05:55 +02:00
17682b74d1 Update dependency greenlet to v3.5.4 2026-08-05 02:05:48 +02:00
2293547d97 Update dependency pydantic-settings to v2.14.2 2026-08-05 02:05:31 +02:00
ac59d976da Update dependency cffi to v2.1.1 2026-08-05 02:05:22 +02:00
8d9909a9ed Update dependency pg to v8.22.0 2026-07-18 02:18:24 +00:00
8b532e831e
fix: improve XML parsing 2026-07-18 04:02:05 +02:00
3065a4d51e
chore: fix coc 2026-07-09 23:11:32 +02:00
cf9a05855f
fix: a rly bad oopsie (untested) 2026-07-09 23:07:16 +02:00
aa5e9e5be0
chore: add .venv 2026-07-09 23:01:38 +02:00
09a2f6f69d revert 3fe3913aa2
revert fix: accept submissions if validation failed
2026-07-07 09:27:13 +02:00
7f187bdad9 Update dependency anyio to v4.14.1 2026-07-06 18:28:19 +02:00
35a6c0db78 feat: add /leaderboard/getplayerstats/pid?mode (#65)
Adds the ability to grab a players stats by pid without them being on the leaderboard. Untested changes.

Reviewed-on: spacebar/SplatNet-Backend#65
2026-07-02 09:13:15 +02:00
10 changed files with 190 additions and 114 deletions

View file

@ -10,7 +10,7 @@ jobs:
runs-on: ${{ vars.RUNNER_LABEL }} runs-on: ${{ vars.RUNNER_LABEL }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v7
- name: install docker??? - name: install docker???
run: | run: |

3
.gitignore vendored
View file

@ -5,4 +5,5 @@ fes_boss.yaml
node_modules node_modules
build build
splatnet_backend.egg-info splatnet_backend.egg-info
venv/* venv/*
.venv/*

View file

@ -1,40 +1,65 @@
# Contributor Covenant Code of Conduct # Spacebar Network Code of Conduct
This repository adheres to the official Spacebar Network Code of Conduct ("COC.") These regulations extend to the entire Spacebar network, our official Discord community, and all Git repositories. By choosing to interact with our community, you are entering into a social contract designed to protect the integrity of the project and the well-being of its members.
> **Note:** If you wish to propose changes or simply view the COC, the primary residence and master copy of this Code of Conduct can be found [here](https://git.spbr.net/spacebar/policy).
If you intend to contribute code, participate in community discussions, or experience any element of the Spacebar ecosystem, you must strictly abide by the standards and expectations set forth in this Covenant. We believe that a healthy community is built on mutual respect and shared responsibility. Our goal is to foster a space that is welcoming, inclusive, and free from harassment for everyone, regardless of their background or level of experience. Failure to adhere to these principles may result in removal from the network, as we prioritize maintaining a safe and productive environment for all participants.
---
## Our Pledge ## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to make the Spacebar community welcoming, safe, and equitable for all.
## Our Standards We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
Examples of behavior that contributes to creating a positive environment include: ## Encouraged Behaviors
* Using welcoming and inclusive language While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include: With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
* The use of sexualized language or imagery and unwelcome sexual attention or advances 1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
* Trolling, insulting/derogatory comments, and personal or political attacks 2. Engaging **kindly and honestly** with others.
* Public or private harassment 3. Respecting **different viewpoints** and experiences.
* Publishing others' private information, such as a physical or electronic address, without explicit permission 4. **Taking responsibility** for our actions and contributions.
* Other conduct which could reasonably be considered inappropriate in a professional setting 5. Gracefully giving and accepting **constructive feedback**.
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.
## Our Responsibilities ## Restricted Behaviors
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyones personality or behavior on the basis of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
7. Behaving in other ways that **threaten the well-being** of our community.
## Scope ### Other Restrictions
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute. If you are found to be using SDK material, all of your content commited towards Spacebar will be removed. No exceptions.
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
5. **Discussion of Piracy, or anything relating.**
## Reporting an Issue
When an incident occurs, it is important to report it promptly. To report a possible violation, please contact the Spacebar Maintainers via contacting a SPFN or SPBR developer on the discord server found [here](https://discord.gg/grMSxZf).
Spacebar moderators take reports seriously and will respond in a timely manner. They will investigate all reports by reviewing logs, messages, or interviewing participants. We aim to keep enforcement actions transparent while prioritizing the safety and confidentiality of those involved.
---
## Attribution ## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
[homepage]: https://contributor-covenant.org Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
[version]: https://contributor-covenant.org/version/1/4/
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources).

128
judd/package-lock.json generated
View file

@ -68,9 +68,9 @@
} }
}, },
"node_modules/@discordjs/rest": { "node_modules/@discordjs/rest": {
"version": "2.6.1", "version": "2.6.3",
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.6.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.6.3.tgz",
"integrity": "sha512-wwQdgjeaoYFiaG+atbqx6aJDpqW7JHAo0HrQkBTbYzM3/PJ3GweQIpgElNcGZ26DCUOXMyawYd0YF7vtr+fZXg==", "integrity": "sha512-wvOylxNYJkwKjctS/Mn5GP1w9r3/rzyH+ThD1JlAca6zEdlHs8QWBBUQJpU5Q+W6DoIj/Ljh1IPlZs7hTU+UAg==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@discordjs/collection": "^2.1.1", "@discordjs/collection": "^2.1.1",
@ -78,10 +78,10 @@
"@sapphire/async-queue": "^1.5.3", "@sapphire/async-queue": "^1.5.3",
"@sapphire/snowflake": "^3.5.5", "@sapphire/snowflake": "^3.5.5",
"@vladfrangu/async_event_emitter": "^2.4.6", "@vladfrangu/async_event_emitter": "^2.4.6",
"discord-api-types": "^0.38.40", "discord-api-types": "^0.38.50",
"magic-bytes.js": "^1.13.0", "magic-bytes.js": "^1.13.0",
"tslib": "^2.6.3", "tslib": "^2.6.3",
"undici": "6.24.1" "undici": "^6.27.0"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
@ -102,16 +102,6 @@
"url": "https://github.com/discordjs/discord.js?sponsor" "url": "https://github.com/discordjs/discord.js?sponsor"
} }
}, },
"node_modules/@discordjs/rest/node_modules/@sapphire/snowflake": {
"version": "3.5.5",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.5.tgz",
"integrity": "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ==",
"license": "MIT",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/util": { "node_modules/@discordjs/util": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.2.0.tgz",
@ -234,9 +224,9 @@
} }
}, },
"node_modules/@sapphire/snowflake": { "node_modules/@sapphire/snowflake": {
"version": "3.5.3", "version": "3.5.5",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.5.tgz",
"integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", "integrity": "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
@ -384,13 +374,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.18.0", "version": "1.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.18.0.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz",
"integrity": "sha512-E32NzpYKp++W7XRe52rHiXV2ehxmh3wbdgO7MHeFM+vqxLBYHzt0ElkiImtOBxtOmyp0yoC8C6uESVV84Y2/hw==", "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.16.0", "follow-redirects": "^1.16.0",
"form-data": "^4.0.5", "form-data": "^4.0.6",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",
"proxy-from-env": "^2.1.0" "proxy-from-env": "^2.1.0"
} }
@ -658,33 +648,33 @@
} }
}, },
"node_modules/discord-api-types": { "node_modules/discord-api-types": {
"version": "0.38.47", "version": "0.38.52",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.38.47.tgz", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.38.52.tgz",
"integrity": "sha512-XgXQodHQBAE6kfD7kMvVo30863iHX1LHSqNq6MGUTDwIFCCvHva13+rwxyxVXDqudyApMNAd32PGjgVETi5rjA==", "integrity": "sha512-uwe9EKfbjsmgWc2fdFjvDbj+dQqx3lp7wqDCmIha0jInuU+xeQjkCK9tMMn+p7RXfdVQORCInq4cD3U2ymDmyg==",
"license": "MIT", "license": "MIT",
"workspaces": [ "workspaces": [
"scripts/actions/documentation" "scripts/actions/documentation"
] ]
}, },
"node_modules/discord.js": { "node_modules/discord.js": {
"version": "14.26.4", "version": "14.27.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.26.4.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.27.0.tgz",
"integrity": "sha512-4oBp8tc6Kf8IDBwAHhbsMaAqx1b5fob9SNasZT7V6yyyUydoO5i5fGuX7TmvRtR+q/WgKRnRViRoAWnG7fNyvA==", "integrity": "sha512-qHbFlFG2N7y3LjPySYsL6A1+BnX6bkTVgo842EX0CqVPk/KTMwZkojPHEXKsQUpWZNyz5BISNHK1cPpQw0+m4A==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@discordjs/builders": "^1.14.1", "@discordjs/builders": "^1.14.1",
"@discordjs/collection": "1.5.3", "@discordjs/collection": "1.5.3",
"@discordjs/formatters": "^0.6.2", "@discordjs/formatters": "^0.6.2",
"@discordjs/rest": "^2.6.1", "@discordjs/rest": "^2.6.2",
"@discordjs/util": "^1.2.0", "@discordjs/util": "^1.2.0",
"@discordjs/ws": "^1.2.3", "@discordjs/ws": "^1.2.3",
"@sapphire/snowflake": "3.5.3", "@sapphire/snowflake": "3.5.5",
"discord-api-types": "^0.38.40", "discord-api-types": "^0.38.49",
"fast-deep-equal": "3.1.3", "fast-deep-equal": "3.1.3",
"lodash.snakecase": "4.1.1", "lodash.snakecase": "4.1.1",
"magic-bytes.js": "^1.13.0", "magic-bytes.js": "^1.13.0",
"tslib": "^2.6.3", "tslib": "^2.6.3",
"undici": "6.24.1" "undici": "^6.27.0"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
@ -833,11 +823,12 @@
} }
}, },
"node_modules/express-rate-limit": { "node_modules/express-rate-limit": {
"version": "8.5.2", "version": "8.6.2",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.5.2.tgz", "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.6.2.tgz",
"integrity": "sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A==", "integrity": "sha512-YH4ru+eOJxQABscKFfRCy9R7x9QFGdezclVMwwgFFndzS2Xnm0uo6B0ABZsLhcpeptGv2qvuJVWlQr9gQZoC3A==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"debug": "^4.4.3",
"ip-address": "^10.2.0" "ip-address": "^10.2.0"
}, },
"engines": { "engines": {
@ -850,6 +841,29 @@
"express": ">= 4.11" "express": ">= 4.11"
} }
}, },
"node_modules/express-rate-limit/node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/express-rate-limit/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/express-subdomain": { "node_modules/express-subdomain": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/express-subdomain/-/express-subdomain-1.0.6.tgz", "resolved": "https://registry.npmjs.org/express-subdomain/-/express-subdomain-1.0.6.tgz",
@ -998,16 +1012,16 @@
} }
}, },
"node_modules/form-data": { "node_modules/form-data": {
"version": "4.0.5", "version": "4.0.6",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0", "es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2", "hasown": "^2.0.4",
"mime-types": "^2.1.12" "mime-types": "^2.1.35"
}, },
"engines": { "engines": {
"node": ">= 6" "node": ">= 6"
@ -1117,9 +1131,9 @@
} }
}, },
"node_modules/hasown": { "node_modules/hasown": {
"version": "2.0.3", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
"integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"function-bind": "^1.1.2" "function-bind": "^1.1.2"
@ -1463,14 +1477,14 @@
} }
}, },
"node_modules/pg": { "node_modules/pg": {
"version": "8.21.0", "version": "8.23.0",
"resolved": "https://registry.npmjs.org/pg/-/pg-8.21.0.tgz", "resolved": "https://registry.npmjs.org/pg/-/pg-8.23.0.tgz",
"integrity": "sha512-AUP1EYJuHraQGsVoCQVIcM7TEJVGtDzxWtGFZd8rds9d+CCXlU5Js1rYgfLNvxy9iJrpHjGrRjoi/3BT9fRyiA==", "integrity": "sha512-Ip2EQCngowJLGOfCwkFhPXU7/ljlhn6Rxlmy4XYfL2Y+vyRM59+8uR2xqRWKdYmbXmxCFOAmKxBuSUCdF34qLg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"pg-connection-string": "^2.13.0", "pg-connection-string": "^2.14.0",
"pg-pool": "^3.14.0", "pg-pool": "^3.14.0",
"pg-protocol": "^1.14.0", "pg-protocol": "^1.16.0",
"pg-types": "2.2.0", "pg-types": "2.2.0",
"pgpass": "1.0.5" "pgpass": "1.0.5"
}, },
@ -1497,9 +1511,9 @@
"optional": true "optional": true
}, },
"node_modules/pg-connection-string": { "node_modules/pg-connection-string": {
"version": "2.13.0", "version": "2.14.0",
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.13.0.tgz", "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.14.0.tgz",
"integrity": "sha512-EMnU9E2fSULdsbErBbMaXJvFeD9B4+nPcM3f+4lsiCR0BHLPrLVjv3DbyM2hgQQviKJaTWIRRTjKjWlHg3p2ig==", "integrity": "sha512-XwWDGcLRGCXAR8F/AM5bG7Q+A3Wm2s6QeEjlOKZLlH3UYcguiqCWKyWXVag5TLTIjR7oOJUY8kcADaZgWPyLeg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/pg-hstore": { "node_modules/pg-hstore": {
@ -1533,9 +1547,9 @@
} }
}, },
"node_modules/pg-protocol": { "node_modules/pg-protocol": {
"version": "1.14.0", "version": "1.16.0",
"resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.14.0.tgz", "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.16.0.tgz",
"integrity": "sha512-n5taZ1kO3s9ngDTVxsEznOqCyToTgz0FLuPq0B33COy5pPpuWJpY3/2oRBVETuOgzdqRXfWpM9HIhp2LBBT1BA==", "integrity": "sha512-sILXutLVjCLjcDuOmvhX5e2Z4cS5qG/6Bu3VkpFwdf/633ElGLpEh9bgmuI5I4sqKqkifQiGyiCcx1HdtrK7tg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/pg-types": { "node_modules/pg-types": {
@ -2113,9 +2127,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/undici": { "node_modules/undici": {
"version": "6.24.1", "version": "6.28.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz",
"integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==", "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=18.17" "node": ">=18.17"

View file

@ -34,13 +34,13 @@ router.post('/post', postLimiter, async (request, response, next) => {
try { try {
let isPidValid = true; let isPidValid = true;
try { try {
const spfnCheck = await axios.get(`https://account.spfn.net/api/v2/users/${pid}/mii`); const spfnCheck = await axios.get(`https://account.spbr.net/api/v2/users/${pid}/mii`);
if (typeof spfnCheck.data === 'string' && spfnCheck.data.includes('<code>0008</code>')) { if (typeof spfnCheck.data === 'string' && spfnCheck.data.includes('<code>0008</code>')) {
isPidValid = false; isPidValid = false;
} }
} catch (err) { } catch (err) {
console.error(`Caught error when validating ${pid}:`, err.message || err); console.error(`Caught error when validating ${pid}:`, err.message || err);
isPidValid = true; isPidValid = false;
} }
if (!isPidValid) { if (!isPidValid) {
@ -116,4 +116,4 @@ router.post('/post', postLimiter, async (request, response, next) => {
return response.send('success'); return response.send('success');
}); });
module.exports = router; module.exports = router;

View file

@ -19,7 +19,7 @@ module.exports = {
if (parseInt(data.SessionID) > MAX_INT32) sanitizedData.SessionID = 0; if (parseInt(data.SessionID) > MAX_INT32) sanitizedData.SessionID = 0;
const result = await SplatfestResult.create(sanitizedData); const result = await SplatfestResult.create(sanitizedData, { ordering: false, ignoreDuplicates: false });
await Equipment.upsert({ await Equipment.upsert({
PId: sanitizedData.PId, PId: sanitizedData.PId,

View file

@ -5,20 +5,20 @@ description = "Backend for SplatNet"
readme = "README.md" readme = "README.md"
requires-python = ">=3.11" requires-python = ">=3.11"
dependencies = [ dependencies = [
"annotated-doc==0.0.4", "annotated-doc==0.0.5",
"annotated-types==0.7.0", "annotated-types==0.7.0",
"anyio==4.14.0", "anyio==4.14.1",
"argon2-cffi==25.1.0", "argon2-cffi==25.1.0",
"argon2-cffi-bindings==25.1.0", "argon2-cffi-bindings==25.1.0",
"certifi==2026.6.17", "certifi==2026.7.22",
"cffi==2.0.0", "cffi==2.1.1",
"charset-normalizer==3.4.7", "charset-normalizer==3.4.9",
"click==8.4.1", "click==8.4.2",
"colorama==0.4.6", "colorama==0.4.6",
"cryptography==49.0.0", "cryptography==50.0.0",
"fastapi==0.137.1", "fastapi==0.141.1",
"fastapi-cache2==0.2.2", "fastapi-cache2==0.2.2",
"greenlet==3.5.2", "greenlet==3.5.5",
"h11==0.16.0", "h11==0.16.0",
"httpcore==1.0.9", "httpcore==1.0.9",
"httpx==0.28.1", "httpx==0.28.1",
@ -30,7 +30,7 @@ dependencies = [
"pycparser==3.0", "pycparser==3.0",
"pydantic==2.13.4", "pydantic==2.13.4",
"pydantic-core==2.46.4", "pydantic-core==2.46.4",
"pydantic-settings==2.14.1", "pydantic-settings==2.15.0",
"python-dateutil==2.9.0.post0", "python-dateutil==2.9.0.post0",
"python-dotenv==1.2.2", "python-dotenv==1.2.2",
"python-multipart==0.0.32", "python-multipart==0.0.32",
@ -39,13 +39,13 @@ dependencies = [
"requests-oauthlib==2.0.0", "requests-oauthlib==2.0.0",
"six==1.17.0", "six==1.17.0",
"sqlalchemy==2.0.51", "sqlalchemy==2.0.51",
"starlette==1.3.1", "starlette==1.6.0",
"tweepy==4.16.0", "tweepy==4.17.0",
"typing-extensions==4.15.0", "typing-extensions==4.16.0",
"typing-inspection==0.4.2", "typing-inspection==0.4.3",
"tzdata==2026.2", "tzdata==2026.3",
"urllib3==2.7.0", "urllib3==2.7.0",
"uvicorn==0.49.0", "uvicorn==0.52.1",
"jinja2==3.1.6", "jinja2==3.1.6",
] ]

View file

@ -47,6 +47,20 @@ async def boss_rotation(request: Request):
}) })
return formatted return formatted
def nintydevsuranidiotforusingrgb(color_val):
if not color_val:
return "#000000"
if isinstance(color_val, str):
parts = [float(p.strip()) for p in color_val.split(",") if p.strip()]
elif isinstance(color_val, (list, tuple)):
parts = [float(p) for p in color_val]
else:
return "#000000"
# trash 4th val
rgb = [round(c * 255) for c in parts[:3]]
return f"#{rgb[0]:02X}{rgb[1]:02X}{rgb[2]:02X}"
with open("boss.yaml", "r", encoding='utf-8') as f: with open("boss.yaml", "r", encoding='utf-8') as f:
yaml_data = yaml.safe_load(f) yaml_data = yaml.safe_load(f)
@ -97,14 +111,19 @@ async def boss_rotation(request: Request):
fest_result = parse_iso(time_cfg.get("Result")) fest_result = parse_iso(time_cfg.get("Result"))
teams = fes_yaml.get("Teams", []) teams = fes_yaml.get("Teams", [])
team_shortnames = [] formatted_teams = []
for team in teams: for team in teams:
team_shortnames.append(team.get("ShortName", {})) raw_color = team.get("Color")
formatted_teams.append({
"shortName": team.get("ShortName", {}),
"color": nintydevsuranidiotforusingrgb(raw_color)
})
response_data["splatfestivalSplatfest"] = { response_data["splatfestivalSplatfest"] = {
"stages": format_stages(fes_yaml.get("Stages", [])), "stages": format_stages(fes_yaml.get("Stages", [])),
"mode": RULE_NAMES.get(fes_yaml.get("Rule"), "TurfWar"), "mode": RULE_NAMES.get(fes_yaml.get("Rule"), "TurfWar"),
"teams": team_shortnames, "teams": formatted_teams,
"battleResultRate": fes_yaml.get("BattleResultRate", {}),
"time": { "time": {
"start": fest_start, "start": fest_start,
"end": fest_end, "end": fest_end,

View file

@ -2,7 +2,7 @@ import requests
from config import settings from config import settings
from argon2 import PasswordHasher from argon2 import PasswordHasher
API_URL = "https://account.spfn.net/api/v2" API_URL = "https://account.spbr.net/api/v2"
CLIENT_ID = "splatnet" CLIENT_ID = "splatnet"
CLIENT_SECRET = settings.account_client_secret CLIENT_SECRET = settings.account_client_secret
ph = PasswordHasher() ph = PasswordHasher()
@ -38,4 +38,4 @@ def get_profile(token):
response = requests.get(url, headers=headers, timeout=10) response = requests.get(url, headers=headers, timeout=10)
return response.json() if response.ok else None return response.json() if response.ok else None

View file

@ -15,29 +15,46 @@ def process_boss_file():
base_url = settings.boss_url.rstrip('/') base_url = settings.boss_url.rstrip('/')
tasks = [ tasks = [
{"url": f"{base_url}/zvGSM4kOrXpkKnpT/schdat2?c=JP&l=en", "output": "boss.yaml"}, {
{"url": f"{base_url}/zvGSM4kOrXpkKnpT/optdat2?c=US&l=en", "output": "fes_boss.yaml"} "url": f"{base_url}/zvGSM4kOrXpkKnpT/schdat2?c=JP&l=en",
"filename": "VSSetting.byaml",
"output": "boss.yaml"
},
{
"url": f"{base_url}/zvGSM4kOrXpkKnpT/optdat2?c=US&l=en",
"filename": "Festival.byaml",
"output": "fes_boss.yaml"
}
] ]
try: try:
success_all = True success_all = True
for task in tasks: for task in tasks:
master_url = task["url"] master_url = task["url"]
target_filename = task["filename"]
output_yaml = task["output"] output_yaml = task["output"]
print(f"data get: {master_url}") print(f"data get: {master_url}")
meta_res = requests.get(master_url, timeout=10) meta_res = requests.get(master_url, timeout=10)
meta_res.raise_for_status() meta_res.raise_for_status()
root = ET.fromstring(meta_res.content) root = ET.fromstring(meta_res.content)
data_url_element = root.find(".//Url")
if data_url_element is None or not data_url_element.text: # LMFAO HOW DID THIS FLY UNDER THE RADAR FOR SO LONG
print("woops! no <Url> tag found in the XML response") real_data_url = None
for file_element in root.findall(".//File"):
filename_elem = file_element.find("Filename")
if filename_elem is not None and filename_elem.text == target_filename:
url_elem = file_element.find("Url")
if url_elem is not None and url_elem.text:
real_data_url = url_elem.text.strip()
break
if not real_data_url:
print(f"woops! could not find URL for file '{target_filename}' in the XML response")
success_all = False success_all = False
continue continue
real_data_url = data_url_element.text.strip() print(f"parsed data url for {target_filename}: {real_data_url}")
print(f"parsed data url: {real_data_url}")
res = requests.get(real_data_url, timeout=10) res = requests.get(real_data_url, timeout=10)
res.raise_for_status() res.raise_for_status()