Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
DomathID authored Jun 20, 2024
1 parent d728414 commit 2a9eed5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const port = process.env.PORT || 3000;
const baseURL = 'https://live2d.nekochan.eu.org';
const githubRepoURL = 'https://api.github.com/repos/DomathID/live2d-model/contents/';

app.get('/api/:modelName', async (req, res) => {
app.get('/:modelName', async (req, res) => {
const modelName = req.params.modelName;
const modelUrl = `${baseURL}/${modelName}/model.json`;

Expand All @@ -21,7 +21,7 @@ app.get('/api/:modelName', async (req, res) => {
}
});

app.get('/api/models', async (req, res) => {
app.get('/', async (req, res) => {
try {
const response = await axios.get(githubRepoURL);
const models = response.data.filter(item => item.type === 'dir').map(item => item.name);
Expand Down

0 comments on commit 2a9eed5

Please sign in to comment.