Skip to content

Remove Mongo URL logging > prod #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
14df18a
TCA-354 - fix handler for external urls when url is fcc lesson
vas3a Sep 5, 2022
82b97c9
Merge pull request #65 from topcoder-platform/TCA-354_fcc-provider-na…
vas3a Sep 6, 2022
6271c97
Removes logging of Mongo URL
testflyjets Sep 6, 2022
3da686f
Merge pull request #66 from topcoder-platform/remove-mongo-url-logging
testflyjets Sep 6, 2022
3579444
TCA-397 #comment This commit adds the gtm module declaration #time 5m
brooketopcoder Sep 6, 2022
95bf94b
TCA-397 #comment This commit adds the pre-commit check back to the de…
brooketopcoder Sep 6, 2022
617639b
TCA-397 #comment This commit adds more loggingn to the call to save a…
brooketopcoder Sep 6, 2022
54b1a70
TCA-397 revert errant changes #time 5m
brooketopcoder Sep 6, 2022
7752094
TCA-385 #comment This commit adds logging #time 5m
brooketopcoder Sep 6, 2022
8f814e6
Merge pull request #68 from topcoder-platform/TCA-397_lint-issues
brooketopcoder Sep 6, 2022
b1c95a3
Merge branch 'dev' into TCA-385_forbidden
brooketopcoder Sep 6, 2022
c9dcaf3
Merge pull request #69 from topcoder-platform/TCA-385_forbidden
brooketopcoder Sep 6, 2022
ee95a5e
Delete Jenkinsfile
Gunasekar-K Sep 7, 2022
7082367
Create Jenkinsfile
Gunasekar-K Sep 7, 2022
e833c37
TCA-397 #comment This commit fixes a lint issue that only appears in …
brooketopcoder Sep 7, 2022
05405ba
Merge pull request #70 from topcoder-platform/TCA-397_lint-issues
brooketopcoder Sep 7, 2022
26d9fdc
TCA-385 #comment This commit adds more logging to the request to save…
brooketopcoder Sep 7, 2022
183c520
Merge pull request #71 from topcoder-platform/TCA-385_forbidden
brooketopcoder Sep 7, 2022
bf5b1c2
TCA-385 #comment This commit adds more logging #time 5m
brooketopcoder Sep 7, 2022
f22345a
Merge pull request #72 from topcoder-platform/TCA-385_forbidden
brooketopcoder Sep 7, 2022
4398cc3
TCA-385 remove extra logging #time 5m
brooketopcoder Sep 9, 2022
934011d
Merge pull request #73 from topcoder-platform/TCA-385_forbidden
brooketopcoder Sep 9, 2022
3289005
TCA-425 - Update backend projects to advance to next lesson without c…
vas3a Sep 15, 2022
d22a7f2
lint
vas3a Sep 15, 2022
09b38a4
Merge pull request #74 from topcoder-platform/TCA-425_update-backend-…
vas3a Sep 15, 2022
479ae53
Merge branch 'prod' into dev
brooketopcoder Sep 15, 2022
0321879
TCA-385 clean up logging #time 15
brooketopcoder Sep 15, 2022
53d7124
Merge pull request #76 from topcoder-platform/TCA-385_forbidden
brooketopcoder Sep 15, 2022
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
10 changes: 9 additions & 1 deletion api-server/src/server/boot/challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,24 @@ export function isValidChallengeCompletion(req, res, next) {
message: 'That does not appear to be a valid challenge submission.'
};

console.debug('console.debug');
Copy link

@brooketopcoder brooketopcoder Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we hold off on deploying this logging to prod? It was meant to be temporary, but I was never able to test it bc of the deployment issue.

Maybe we can merge the branch that removes the mongo db logging directly into master instead of going through dev?

I am also seeing some other changes not related to the mongo db logging in this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine if we want to merge just my branch into master.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@testflyjets Cool--I'd be more comfortable if we did that.

console.info('console.info');
console.error('console.error');
console.log('console.log');

if (!ObjectID.isValid(id)) {
log('isObjectId', id, ObjectID.isValid(id));
console.debug('isObjectId', id, ObjectID.isValid(id));
return res.status(403).json(isValidChallengeCompletionErrorMsg);
}
if ('challengeType' in req.body && !isNumeric(String(challengeType))) {
log('challengeType', challengeType, isNumeric(challengeType));
console.debug('challengeType', challengeType, isNumeric(challengeType));
return res.status(403).json(isValidChallengeCompletionErrorMsg);
}
if ('solution' in req.body && !isURL(solution)) {
log('isObjectId', id, ObjectID.isValid(id));
log('solution', solution, !isURL(solution));
console.debug('solution', solution, !isURL(solution));
return res.status(403).json(isValidChallengeCompletionErrorMsg);
}
return next();
Expand Down
2 changes: 0 additions & 2 deletions api-server/src/server/middlewares/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const MongoStore = MongoStoreFactory(session);
const sessionSecret = process.env.SESSION_SECRET;
const url = process.env.MONGODB || process.env.MONGOHQ_URL;

console.log('session DB url', url);

export default function sessionsMiddleware() {
return session({
// 900 day session cookie
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/layouts/tc-integration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class TcIntegrationLayout extends Component<TcIntegrationLayoutProps> {
// provider.

// set the pathname for the 2 flavors of lesson URL
const platformPathPrefix = 'learn/freecodecamp';
const platformPathPrefix = 'learn/freeCodeCamp';
const learnPrefix = '/learn/';
let updateHost = false;
if (url.host === `learn.${fccHost}`) {
Expand Down
1 change: 1 addition & 0 deletions client/src/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ declare module '@freecodecamp/strip-comments';
declare module '@types/react-redux';
declare module '@types/validator';
declare module '@types/lodash-es';
declare module 'react-gtm-module';
declare module 'react-lazy-load';
declare module '*.svg' {
const content: string;
Expand Down