From 2a9eed532981467c824f19323ad5d911a4bc4270 Mon Sep 17 00:00:00 2001 From: Bang Domath ID Date: Thu, 20 Jun 2024 13:09:06 +0700 Subject: [PATCH] Update index.js --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c2ea596..b8ef2bc 100644 --- a/index.js +++ b/index.js @@ -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`; @@ -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);