chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@ -1,9 +1,9 @@
// @flow
import crypto from 'crypto';
import { DataTypes, sequelize } from '../sequelize';
import crypto from "crypto";
import { DataTypes, sequelize } from "../sequelize";
const NotificationSetting = sequelize.define(
'notification_setting',
"notification_setting",
{
id: {
type: DataTypes.UUID,
@ -15,11 +15,11 @@ const NotificationSetting = sequelize.define(
validate: {
isIn: [
[
'documents.publish',
'documents.update',
'collections.create',
'emails.onboarding',
'emails.features',
"documents.publish",
"documents.update",
"collections.create",
"emails.onboarding",
"emails.features",
],
],
},
@ -43,20 +43,20 @@ const NotificationSetting = sequelize.define(
);
NotificationSetting.getUnsubscribeToken = userId => {
const hash = crypto.createHash('sha256');
const hash = crypto.createHash("sha256");
hash.update(`${userId}-${process.env.SECRET_KEY}`);
return hash.digest('hex');
return hash.digest("hex");
};
NotificationSetting.associate = models => {
NotificationSetting.belongsTo(models.User, {
as: 'user',
foreignKey: 'userId',
onDelete: 'cascade',
as: "user",
foreignKey: "userId",
onDelete: "cascade",
});
NotificationSetting.belongsTo(models.Team, {
as: 'team',
foreignKey: 'teamId',
as: "team",
foreignKey: "teamId",
});
};