Add todo and remove mockdata

This commit is contained in:
Liam 2022-10-20 15:59:03 +01:00
parent 7fcec62869
commit bbff99aff0
4 changed files with 22 additions and 21 deletions

View File

@ -1,16 +1,29 @@
# BeatSaber Overlay with real-time data from HttpSiraStatus
The public url to view/use: https://bs-overlay.fascinated.cc</br>
The public url to view/use: <https://bs-overlay.fascinated.cc></br>
Need help? Feel free to message me at: Fascinated#4719
## Usage
You will need [HttpSiraStatus](https://github.com/denpadokei/HttpSiraStatus) if you wish to use the note cut and/or the song info</br>
To get started go to https://bs-overlay.fascinated.cc and it is fairly self explanatory on how it all works</br>
## Preview:
You will need [HttpSiraStatus](https://github.com/denpadokei/HttpSiraStatus) if you wish to use the note cut and/or the song info</br>
To get started go to <https://bs-overlay.fascinated.cc> and it is fairly self explanatory on how it all works</br>
## Preview
![Overlay](https://cdn.fascinated.cc/HCrnvhsHGG.png?raw=true)
![Builder Menu](https://cdn.fascinated.cc/QwGTQLhJsq.png?raw=true)
## Todo
- Move caches to Redis
- Move media to my CDN server
- Cache BeatSaver data
- Add cache status in the response headers
- Move configuration files to ENV files
- Add toggle for showing pp
- Cleanup the API (or just re-do it)
- Change the song time to a circular style in the song art
## Getting Started with developent
First, install the node dependencies:
@ -27,6 +40,6 @@ Secondly, open the development server
npm run dev
# or
yarn dev
````
```
Lastly, open the project with an IDE of your choice :)

View File

@ -1,10 +0,0 @@
export default async function handler(req, res) {
res.json({
avatar:
"https://avatars.akamai.steamstatic.com/4322d8d20cb6dbdd1d891b4efa9952a9679c9a76_full.jpg",
country: "GB",
pp: 0,
rank: 0,
countryRank: 0,
});
}

View File

@ -175,9 +175,10 @@ export default class Overlay extends Component {
*/
async updateData(id) {
const data = await fetch(
Utils.getWebsiteApi(
id == "test" ? "Test" : this.state.websiteType
).ApiUrl.PlayerData.replace("%s", id),
Utils.getWebsiteApi(this.state.websiteType).ApiUrl.PlayerData.replace(
"%s",
id
),
{
headers: {
"X-Requested-With": "BeatSaber Overlay",

View File

@ -36,9 +36,6 @@ const WebsiteTypes = {
return Number.isNaN(pp) ? undefined : pp;
},
},
Test: {
ApiUrl: "/api/mockdata",
},
};
export default WebsiteTypes;