Skip to content

Commit

Permalink
Remove code for APIs that are not in use anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
armenzg committed Nov 14, 2018
1 parent 4bb3d35 commit 3a67fde
Show file tree
Hide file tree
Showing 28 changed files with 7 additions and 105,555 deletions.
8 changes: 0 additions & 8 deletions package.json
Expand Up @@ -26,22 +26,14 @@
"license": "MPL-2.0",
"dependencies": {
"async-redis": "^1.1.4",
"browserslist": "^2.2.2",
"caniuse-db": "^1.0.30000712",
"cheerio": "^1.0.0-rc.2",
"chrono-node": "^1.3.5",
"dotenv": "^4.0.0",
"googleapis": "^27.0.0",
"ical-with-secure-request": "^0.6.0",
"isomorphic-fetch": "^2.2.1",
"json2csv": "^3.11.0",
"koa": "^2.3.0",
"koa-compress": "^3.0.0",
"koa-cors": "0.0.16",
"koa-logger": "^2.0.1",
"koa-response-time": "^2.0.0",
"koa-router": "^7.2.1",
"lodash": "^4.17.2",
"moment": "^2.19.3",
"qs": "^6.5.0",
"query-string": "^5.0.1",
Expand Down
9 changes: 0 additions & 9 deletions src/app.js
@@ -1,19 +1,13 @@
import { Z_SYNC_FLUSH } from 'zlib';
import dotenv from 'dotenv';
import responseTime from 'koa-response-time';
import Router from 'koa-router';
import cors from 'koa-cors';
import Koa from 'koa';
import compress from 'koa-compress';
import { createClient } from 'async-redis';

dotenv.config();

/* eslint-disable import/first */
import { router as release } from './release';
import { router as crashes } from './crashes';
import { router as bz } from './bz';
import { router as status } from './status';
import { router as perf } from './perf';
import { router as android } from './android/routes';
/* eslint-enable import/first */
Expand Down Expand Up @@ -47,10 +41,7 @@ api.get('/cache/flush', async (ctx) => {
};
});

api.use('/release', release.routes());
api.use('/crashes', crashes.routes());
api.use('/bz', bz.routes());
api.use('/status', status.routes());
api.use('/perf', perf.routes());
api.use('/android', android.routes());

Expand Down
40 changes: 0 additions & 40 deletions src/bz.js
@@ -1,11 +1,7 @@
import Router from 'koa-router';
import moment from 'moment';
import _ from 'lodash/fp';
import { stringify } from 'qs';
import fetchJson from './fetch/json';
import { getRelease } from './bz/release';
// import { getHistory } from './release/history';
// import { getMissedCount } from './bz/regressions';

export const router = new Router();

Expand Down Expand Up @@ -104,40 +100,4 @@ router

ctx.body = timeline;
return ctx.body;
})

.get('/status', async (ctx) => {
const { ids } = ctx.request.query;
ctx.body = await getRelease(ids);
})

.get('/regressions/missed', async (ctx) => {
// const history = await getHistory({
// major: true,
// tailVersion: 5,
// });
// history.reverse();
// const counts = await Promise.all(
// history.map((release) => {
// const version = release.version;
// return getMissedCount(version, release.date);
// })
// );
ctx.body = [
{ count: 86, version: 40 },
{ count: 93, version: 41 },
{ count: 109, version: 42 },
{ count: 92, version: 43 },
{ count: 87, version: 44 },
{ count: 76, version: 45 },
{ count: 0, version: 46 },
{ count: 0, version: 47 },
];
// counts.map(({ count, query }, idx) => {
// return {
// count,
// query,
// version: history[idx].version,
// };
// });
});
27 changes: 0 additions & 27 deletions src/bz/regressions.js

This file was deleted.

56 changes: 0 additions & 56 deletions src/bz/release.js

This file was deleted.

151 changes: 0 additions & 151 deletions src/crashes.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/fetch/html.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/fetch/redash.js

This file was deleted.

0 comments on commit 3a67fde

Please sign in to comment.