Skip to content

Commit

Permalink
Merge pull request #49 from WaifuAPI/staging
Browse files Browse the repository at this point in the history
Added base api redirect to docs
  • Loading branch information
kyrea authored Jul 13, 2023
2 parents de43268 + e1a107b commit bf42ca0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 44 deletions.
63 changes: 33 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "waifu.it",
"version": "3.4.13",
"version": "3.4.14",
"description": "Random API Serving Anime stuff",
"author": "Aeryk",
"private": true,
Expand All @@ -14,30 +14,30 @@
"dev": "nodemon src/index.js"
},
"dependencies": {
"chalk": "^4.1.1",
"cli-table3": "^0.6.0",
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"cors": "^2.8.5",
"discord-webhook-node": "^1.1.8",
"dotenv": "^8.6.0",
"express": "^4.18.2",
"express-rate-limit": "^5.3.0",
"express-winston": "^4.1.0",
"generate-password": "^1.6.0",
"http-errors": "^1.7.2",
"express-rate-limit": "^5.5.1",
"express-winston": "^4.2.0",
"generate-password": "^1.7.0",
"http-errors": "^1.8.1",
"is-interactive": "^1.0.0",
"moment": "^2.29.1",
"moment": "^2.29.4",
"mongodb": "^3.6.9",
"mongoose": "^5.13.9",
"mongoose": "^5.13.20",
"ora": "^5.4.1",
"owoify-js": "^2.0.0",
"path": "^0.12.7",
"request-ip": "^2.1.3",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.5.5"
"request-ip": "^2.2.0",
"winston": "^3.10.0",
"winston-daily-rotate-file": "^4.7.1"
},
"devDependencies": {
"nodemon": "^2.0.12",
"prettier": "^2.3.2"
"nodemon": "^2.0.22",
"prettier": "^2.8.8"
},
"keywords": [
"node",
Expand Down
5 changes: 5 additions & 0 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ const Limiter = rateLimit({
},
})

// Base API
router.get('/api', (req, res) => {
res.redirect("https://docs.waifu.it/list-of-endpoints");
})

// Fact Endpoints
router.get('/api/fact', Limiter, authHandler, randomFacts)

Expand Down

0 comments on commit bf42ca0

Please sign in to comment.