mirror of https://github.com/aruppi/aruppi-api
v2.6.5 - Improve versions
This commit is contained in:
parent
0c57e47bb4
commit
fd0583de4f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "aruppi",
|
||||
"version": "2.6.4",
|
||||
"version": "2.6.5",
|
||||
"description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app",
|
||||
"main": "./src/api/api.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
const express = require('express');
|
||||
const routes = require('./routes/index');
|
||||
const version = require('./../../package.json').version;
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.set('Cache-Control', 'no-store');
|
||||
res.json({
|
||||
message: 'Aruppi API - 🎏',
|
||||
author: 'Jéluchu',
|
||||
version: '2.6.4',
|
||||
version: version,
|
||||
credits: 'The bitch loves APIs that offers data to Aruppi App',
|
||||
entries: [
|
||||
{
|
||||
|
|
11
src/app.js
11
src/app.js
|
@ -2,6 +2,7 @@ const express = require('express');
|
|||
const helmet = require('helmet');
|
||||
const cors = require('cors');
|
||||
const bodyParser = require('body-parser');
|
||||
const version = require('./../package.json').version;
|
||||
|
||||
const middlewares = require('./middlewares/index').middleware;
|
||||
const api = require('./api');
|
||||
|
@ -14,17 +15,25 @@ app.use(bodyParser.json());
|
|||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
|
||||
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.set('Cache-Control', 'no-store');
|
||||
res.redirect('/api/')
|
||||
});
|
||||
|
||||
app.get('/api/', (req, res) => {
|
||||
res.set('Cache-Control', 'no-store');
|
||||
res.json({
|
||||
message: 'Tu~tu~ruuu! You have traveled to the API Black Hole'
|
||||
title: 'Aruppi API',
|
||||
version: version,
|
||||
source: 'https://github.com/aruppi/aruppi-api',
|
||||
description: 'This API has everything about Japan, from anime, music, radio, images, videos... to japanese culture (Spanish Only)',
|
||||
powers: 'https://play.google.com/store/apps/details?id=com.jeluchu.aruppi&hl=es_419'
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/api/v1', (req, res) => {
|
||||
res.set('Cache-Control', 'no-store');
|
||||
res.json({
|
||||
message: 'Sorry, version v1 is deprecated, if you want to see content go to v2'
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue