Skip to content

Commit

Permalink
Remove dev logging
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-sawhney committed Jan 24, 2022
1 parent 5d3cca3 commit 2670433
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 35 deletions.
1 change: 0 additions & 1 deletion api/src/controllers/resource.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export const getResourceByName = async (
): Promise<void> => {
const options = extractOptions(req.query);

console.log(req.params.name);
const resource = await ResourceService.getByName(req.params.name, options);

if (!resource) {
Expand Down
7 changes: 0 additions & 7 deletions api/src/controllers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { PaginateOptions } from '../services/types';
export const extractPopulateQuery = (
query: Record<string, unknown>,
): 'none' | 'default' | 'full' => {
console.log(query);
if (!query.populate) {
return 'none';
}
Expand Down Expand Up @@ -144,11 +143,6 @@ const extractFilterQuery = <T>(
}
}

console.log('Filter is: ', filter);
console.log('Field is: ', field);
console.log('Operator is: ', operator);
console.log('Value is: ', value);

if (operator) {
return { [field]: { [`$${operator}`]: value } };
}
Expand All @@ -158,6 +152,5 @@ const extractFilterQuery = <T>(

const filters = _.merge({}, ...cleanFilters);

console.log(filters);
return filters;
};
3 changes: 0 additions & 3 deletions api/src/mail/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ export const sendMail = async (mailOptions: SendMailOptions): Promise<void> => {
};

export const sendRejectUserMail = (contributor: User, reviewer: User): void => {
console.log(contributor);
console.log(reviewer);

const templateValues = {
contributor: contributor.fullname,
role: contributor.role,
Expand Down
5 changes: 0 additions & 5 deletions api/src/services/pitch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ const paginate = async (
searchFilter(search),
);

console.log('Mereged filters: ');
console.log(mergedFilters);

const pitches = await Pitch.find(mergedFilters)
.skip(offset * limit)
.limit(limit)
Expand Down Expand Up @@ -459,7 +456,6 @@ export const decrementTeamTarget = async (
let pitch;

if (pitchWithTeam) {
//console.log('WITH TEAM');
pitch = await updateModel(
{
_id: _id,
Expand All @@ -473,7 +469,6 @@ export const decrementTeamTarget = async (
},
);
} else {
//console.log('NO TEAM');
pitch = await updateModel(
{ _id },
{
Expand Down
3 changes: 0 additions & 3 deletions client/src/components/form/ReviewClaimForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ export const ReviewClaimForm: FC<FormProps> = ({
),
};

console.log('NEW PITCH', newPitch);

const pitchIds = pitch!.issueStatuses.map(({ issueId: { _id } }) => _id);
const newIds = data.issueStatuses.map(({ issueId: { _id } }) => _id);

Expand Down Expand Up @@ -265,7 +263,6 @@ export const ReviewClaimForm: FC<FormProps> = ({
{editMode ? (
<>
<div>
{console.log('hey')}
<b>Add Pitch to Issue(s)</b>
<MultiSelect
options={issues.map((issue) => ({
Expand Down
7 changes: 2 additions & 5 deletions client/src/components/modal/AddIssue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const AddIssueModal: FC<ModalProps> = ({ ...rest }): ReactElement => {
} else if (res.error.response.status === 409) {
toast.error('Issue with this date and type already exists');
} else {
console.log(res);
toast.error('Unable to add a new issue');
}
};
Expand All @@ -66,10 +65,8 @@ const AddIssueModal: FC<ModalProps> = ({ ...rest }): ReactElement => {
changeField('type', value ? (value as string) : '');
};

const formatDate = (date: Date | undefined): string => {
console.log(date);
return new Date(date || new Date()).toISOString().split('T')[0];
};
const formatDate = (date: Date | undefined): string =>
new Date(date || new Date()).toISOString().split('T')[0];

useEffect(() => {
setFormData(defaultData);
Expand Down
2 changes: 0 additions & 2 deletions client/src/components/modal/SubmitPitchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export const SubmitPitchModal: FC<ModalProps> = ({ ...rest }): ReactElement => {
author: user!._id,
};

console.log(data.writerIntent);

if (data.writerIntent === undefined || data.writerIntent === 'false') {
body.writer = undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const IndividualTab: FC<QuestionsTabProps> = ({
<dt className="block">{feedback.secondQuestion}</dt>
<dt>
List any new contacts you made that could be useful for future Weekly
writers to have (include ƒname, organizational affiliation, contact
writers to have (include name, organizational affiliation, contact
info):
</dt>
<dt className="block">{feedback.thirdQuestion}</dt>
Expand Down
8 changes: 1 addition & 7 deletions client/src/components/table/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ export const pitchStatusCol = configureColumn<
id: 'status',
title: 'Status',
width: 1,
extractor: function StatusCell({ title, status }) {
console.log(title, status);
extractor: function StatusCell({ status }) {
return <FieldTag content={status} size={'small'} />;
},
});
Expand All @@ -372,11 +371,6 @@ export const associatedTeamsColumn = configureColumn<
const { user } = useAuth();
const { teams } = useTeams();

if (pitch.title.includes('National')) {
console.log(getPitchTeamsForContributor(pitch, user!, teams));
console.log(pitch);
}

return (
<div>
<TagList
Expand Down
1 change: 0 additions & 1 deletion client/src/pages/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const Resources = (): ReactElement => {
}, [isOnboarded]);

const getCalendlyUrl = (): string => {
console.log(window.location.hostname);
if (window.location.hostname === 'localhost') {
return 'https://calendly.com/sawhney4/60min';
}
Expand Down

1 comment on commit 2670433

@vercel
Copy link

@vercel vercel bot commented on 2670433 Jan 24, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.