chore: Upgrade Prettier 1.8 -> 2.0 (#1436)
This commit is contained in:
@ -25,12 +25,12 @@ const View = sequelize.define(
|
||||
}
|
||||
);
|
||||
|
||||
View.associate = models => {
|
||||
View.associate = (models) => {
|
||||
View.belongsTo(models.Document);
|
||||
View.belongsTo(models.User);
|
||||
};
|
||||
|
||||
View.increment = async where => {
|
||||
View.increment = async (where) => {
|
||||
const [model, created] = await View.findOrCreate({ where });
|
||||
if (!created) {
|
||||
model.count += 1;
|
||||
@ -39,7 +39,7 @@ View.increment = async where => {
|
||||
return model;
|
||||
};
|
||||
|
||||
View.findByDocument = async documentId => {
|
||||
View.findByDocument = async (documentId) => {
|
||||
return View.findAll({
|
||||
where: { documentId },
|
||||
order: [["updatedAt", "DESC"]],
|
||||
@ -52,7 +52,7 @@ View.findByDocument = async documentId => {
|
||||
});
|
||||
};
|
||||
|
||||
View.findRecentlyEditingByDocument = async documentId => {
|
||||
View.findRecentlyEditingByDocument = async (documentId) => {
|
||||
return View.findAll({
|
||||
where: {
|
||||
documentId,
|
||||
|
Reference in New Issue
Block a user