cleaned up config as js instead of json file

This commit is contained in:
Wyatt Johnson
2018-05-03 11:40:55 -06:00
parent 20c5804559
commit df29e610b3
6 changed files with 8 additions and 8 deletions
@@ -6,7 +6,7 @@ import moment from 'moment';
import { Button, Icon } from 'plugin-api/beta/client/components/ui';
import styles from './AccountDeletionRequestedSign.css';
import { getErrorMessages } from 'coral-framework/utils';
import { scheduledDeletionDelayHours } from '../../config.json';
import { scheduledDeletionDelayHours } from '../../config';
class AccountDeletionRequestedSign extends React.Component {
cancelAccountDeletion = async () => {
@@ -4,7 +4,7 @@ import cn from 'classnames';
import { Button } from 'plugin-api/beta/client/components/ui';
import styles from './DeleteMyAccountStep.css';
import { t } from 'plugin-api/beta/client/services';
import { scheduledDeletionDelayHours } from '../../config.json';
import { scheduledDeletionDelayHours } from '../../config';
const DeleteMyAccountStep1 = props => (
<div className={styles.step}>
@@ -4,7 +4,7 @@ import { t } from 'plugin-api/beta/client/services';
import { Button } from 'plugin-api/beta/client/components/ui';
import styles from './DownloadCommentHistory.css';
import { getErrorMessages } from 'coral-framework/utils';
import { downloadRateLimitDays } from '../../config.json';
import { downloadRateLimitDays } from '../../config';
export const readableDuration = durAsHours => {
const durAsDays = Math.ceil(durAsHours / 24);
@@ -0,0 +1,4 @@
module.exports = {
scheduledDeletionDelayHours: 24,
downloadRateLimitDays: 7,
};
@@ -1,4 +0,0 @@
{
"scheduledDeletionDelayHours": 24,
"downloadRateLimitDays": 7
}
@@ -11,7 +11,7 @@ const { URL } = require('url');
const {
scheduledDeletionDelayHours,
downloadRateLimitDays,
} = require('../config.json');
} = require('../config');
// generateDownloadLinks will generate a signed set of links for a given user to
// download an archive of their data.