Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import mockDocuSignFactory from './__mocks__/docu-sign-mock';
import recruitCRMRouter from './routes/recruitCRM';
import mmLeaderboardRouter from './routes/mmLeaderboard';
import feedsRouter from './routes/feeds';
import blogRouter from './routes/blog';

/* Dome API for topcoder communities */
import tcCommunitiesDemoApi from './tc-communities';
Expand Down Expand Up @@ -164,7 +163,6 @@ async function onExpressJsSetup(server) {

const checkAuthorizationHeader = (req, res, next) => {
if (req.headers.authorization !== `ApiKey ${config.SERVER_API_KEY}`) {
console.log('checkAuthorizationHeader failed');
return res.status(403).end();
}
return next();
Expand Down Expand Up @@ -279,7 +277,6 @@ async function onExpressJsSetup(server) {
server.use('/api/recruit', recruitCRMRouter);
server.use('/api/mml', mmLeaderboardRouter);
server.use('/api/feeds', feedsRouter);
server.use('/api/blog', blogRouter);

// serve demo api
server.use(
Expand Down
20 changes: 0 additions & 20 deletions src/server/routes/blog.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/server/routes/contentful.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ routes.use(
} = req.params;
const spaceId = getSpaceId(spaceName);
if (!ALLOWED_DOMAINS.includes(ASSETS_DOMAIN)) {
console.log('Invalid domain detected!');
throw new Error('Invalid domain detected!');
}
const url = new URL(`https://${ASSETS_DOMAIN}/spaces/${spaceId}/environments/${environment}/${id}/${version}/${name}`);
Expand Down Expand Up @@ -117,7 +116,6 @@ routes.use(
.getAsset(id)
.then(res.send.bind(res), next);
} catch (e) {
console.log('error in getting published asset', e);
next(e);
}
},
Expand All @@ -131,7 +129,6 @@ routes.use(':spaceName/:environment/published/assets', (req, res, next) => {
.queryAssets(req.query)
.then(res.send.bind(res), next);
} catch (e) {
console.log('error in getting published assets', e);
next(e);
}
});
Expand All @@ -146,7 +143,6 @@ routes.use(
.getEntry(id)
.then(res.send.bind(res), next);
} catch (e) {
console.log('error in getting published entry', e);
next(e);
}
},
Expand All @@ -155,13 +151,11 @@ routes.use(
/* Queries published entries of a given space name and environment. */
routes.use('/:spaceName/:environment/published/entries', (req, res, next) => {
try {
console.log('hits cdn published entries');
const { environment, spaceName } = req.params;
getService(spaceName, environment, false)
.queryEntries(req.query)
.then(res.send.bind(res), next);
} catch (e) {
console.log('error in getting published entries', e);
next(e);
}
});
Expand All @@ -172,7 +166,6 @@ routes.use('/:spaceName/:environment/votes', (req, res, next) => authenticator(a
articleVote(req.body)
.then(res.send.bind(res), next);
} catch (e) {
console.log('error in voting', e);
next(e);
}
});
Expand Down
2 changes: 0 additions & 2 deletions src/server/routes/feeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ routes.options('*', cors());

routes.get('/thrive', async (req, res, next) => {
try {
console.log('hits thrive route', process.version);
const data = await getService('EDU', 'master', true).queryEntries({
content_type: 'article',
limit: 20,
Expand All @@ -30,7 +29,6 @@ routes.get('/thrive', async (req, res, next) => {
'sys.firstPublishedAt[exists]': true,
});

console.log('after initializing thrive service', data);
const feed = new RSS({
title: 'Topcoder Thrive',
description: 'Tutorials And Workshops That Matter | Thrive | Topcoder',
Expand Down
32 changes: 0 additions & 32 deletions src/server/services/blog.js

This file was deleted.

1 change: 0 additions & 1 deletion src/server/services/contentful.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ export function getSpaceId(spaceName) {
* @param {Boolean} preview
*/
export function getService(spaceName, environment, preview) {
console.log('getService', spaceName, environment, preview);
if (!services) {
services = initServiceInstances();
}
Expand Down
Loading