Fix linting
This commit is contained in:
parent
553ba9db9a
commit
bb5189c9ed
35 changed files with 157 additions and 866 deletions
|
@ -13,7 +13,7 @@ export default function (sequelize, DataTypes) {
|
|||
'audio',
|
||||
'video',
|
||||
'archive',
|
||||
'other'
|
||||
'other',
|
||||
),
|
||||
width: DataTypes.INTEGER,
|
||||
height: DataTypes.INTEGER,
|
||||
|
@ -32,14 +32,15 @@ export default function (sequelize, DataTypes) {
|
|||
});
|
||||
|
||||
File.accessed = function accessed(id) {
|
||||
sequelize.query(`
|
||||
sequelize.query(
|
||||
`
|
||||
UPDATE files
|
||||
SET "downloads" = downloads + 1, "accessedAt" = NOW()
|
||||
WHERE "id" = :id`,
|
||||
{
|
||||
replacements: { id },
|
||||
type: sequelize.QueryTypes.UPDATE,
|
||||
}
|
||||
{
|
||||
replacements: { id },
|
||||
type: sequelize.QueryTypes.UPDATE,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -2,10 +2,6 @@ import fs from 'fs';
|
|||
import path from 'path';
|
||||
import Sequelize from 'sequelize';
|
||||
|
||||
import debugname from 'debug';
|
||||
|
||||
const debug = debugname('hostr:models');
|
||||
|
||||
const config = {
|
||||
dialect: 'postgres',
|
||||
protocol: 'postgres',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue