mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Resolve linter issues
This commit is contained in:
@@ -20,7 +20,9 @@ class AccountDeletionRequestedSign extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { me: { scheduledDeletionDate } } = this.props.root;
|
||||
const {
|
||||
me: { scheduledDeletionDate },
|
||||
} = this.props.root;
|
||||
|
||||
const deletionScheduledFor = moment(scheduledDeletionDate).format(
|
||||
'MMM Do YYYY, h:mm a'
|
||||
|
||||
@@ -36,7 +36,11 @@ class DownloadCommentHistory extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { root: { me: { lastAccountDownload } } } = this.props;
|
||||
const {
|
||||
root: {
|
||||
me: { lastAccountDownload },
|
||||
},
|
||||
} = this.props;
|
||||
|
||||
const now = new Date();
|
||||
const lastAccountDownloadDate =
|
||||
|
||||
@@ -18,7 +18,10 @@ const withData = withFragments({
|
||||
});
|
||||
|
||||
export default compose(
|
||||
connect(null, mapDispatchToProps),
|
||||
connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withCancelAccountDeletion,
|
||||
withData,
|
||||
excludeIf(({ root: { me } }) => !me || !me.scheduledDeletionDate)
|
||||
|
||||
@@ -21,7 +21,10 @@ const withData = withFragments({
|
||||
});
|
||||
|
||||
export default compose(
|
||||
connect(null, mapDispatchToProps),
|
||||
connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withRequestAccountDeletion,
|
||||
withCancelAccountDeletion,
|
||||
withData
|
||||
|
||||
@@ -28,7 +28,10 @@ class DownloadCommentHistoryContainer extends Component {
|
||||
const mapDispatchToProps = dispatch => bindActionCreators({ notify }, dispatch);
|
||||
|
||||
const enhance = compose(
|
||||
connect(null, mapDispatchToProps),
|
||||
connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withFragments({
|
||||
root: gql`
|
||||
fragment TalkDownloadCommentHistory_DownloadCommentHistorySection_root on RootQuery {
|
||||
|
||||
@@ -32,7 +32,9 @@ module.exports = connectors => {
|
||||
|
||||
try {
|
||||
// Grab some settings.
|
||||
const { loaders: { Settings } } = ctx;
|
||||
const {
|
||||
loaders: { Settings },
|
||||
} = ctx;
|
||||
const {
|
||||
organizationName,
|
||||
organizationContactEmail,
|
||||
|
||||
@@ -16,7 +16,12 @@ const {
|
||||
// generateDownloadLinks will generate a signed set of links for a given user to
|
||||
// download an archive of their data.
|
||||
async function generateDownloadLinks(ctx, userID) {
|
||||
const { connectors: { url: { BASE_URL }, secrets } } = ctx;
|
||||
const {
|
||||
connectors: {
|
||||
url: { BASE_URL },
|
||||
secrets,
|
||||
},
|
||||
} = ctx;
|
||||
|
||||
// Generate a token for the download link.
|
||||
const token = await secrets.jwt.sign(
|
||||
@@ -42,7 +47,10 @@ async function sendDownloadLink(ctx) {
|
||||
const {
|
||||
user,
|
||||
loaders: { Settings },
|
||||
connectors: { services: { Users, I18n, Limit }, models: { User } },
|
||||
connectors: {
|
||||
services: { Users, I18n, Limit },
|
||||
models: { User },
|
||||
},
|
||||
} = ctx;
|
||||
|
||||
// downloadLinkLimiter can be used to limit downloads for the user's data to
|
||||
@@ -107,7 +115,10 @@ async function sendDownloadLink(ctx) {
|
||||
async function requestDeletion({
|
||||
user,
|
||||
loaders: { Settings },
|
||||
connectors: { models: { User }, services: { Users, I18n } },
|
||||
connectors: {
|
||||
models: { User },
|
||||
services: { Users, I18n },
|
||||
},
|
||||
}) {
|
||||
// Ensure the user doesn't already have a deletion scheduled.
|
||||
if (get(user, 'metadata.scheduledDeletionDate')) {
|
||||
@@ -153,7 +164,10 @@ async function requestDeletion({
|
||||
async function cancelDeletion({
|
||||
user,
|
||||
loaders: { Settings },
|
||||
connectors: { models: { User }, services: { I18n, Users } },
|
||||
connectors: {
|
||||
models: { User },
|
||||
services: { I18n, Users },
|
||||
},
|
||||
}) {
|
||||
// Ensure the user has a deletion scheduled.
|
||||
const scheduledDeletionDate = get(
|
||||
|
||||
@@ -8,7 +8,11 @@ const stringify = require('csv-stringify');
|
||||
const { ErrDownloadToken } = require('./errors');
|
||||
|
||||
async function verifyDownloadToken(
|
||||
{ connectors: { services: { Users } } },
|
||||
{
|
||||
connectors: {
|
||||
services: { Users },
|
||||
},
|
||||
},
|
||||
token
|
||||
) {
|
||||
const jwt = await Users.verifyToken(token, {
|
||||
@@ -139,7 +143,12 @@ module.exports = router => {
|
||||
return;
|
||||
}
|
||||
|
||||
const { connectors: { graph: { Context }, errors } } = req.context;
|
||||
const {
|
||||
connectors: {
|
||||
graph: { Context },
|
||||
errors,
|
||||
},
|
||||
} = req.context;
|
||||
|
||||
try {
|
||||
// Pull the userID and the date that the token was issued out of the
|
||||
|
||||
Reference in New Issue
Block a user