} from './video-abuse-interface'
let VideoAbuse: Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes>
-let toFormatedJSON: VideoAbuseMethods.ToFormatedJSON
+let toFormattedJSON: VideoAbuseMethods.ToFormattedJSON
let listForApi: VideoAbuseMethods.ListForApi
export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
type: DataTypes.STRING,
allowNull: false,
validate: {
- reporterUsernameValid: function (value) {
+ reporterUsernameValid: value => {
const res = isVideoAbuseReporterUsernameValid(value)
if (res === false) throw new Error('Video abuse reporter username is not valid.')
}
type: DataTypes.STRING,
allowNull: false,
validate: {
- reasonValid: function (value) {
+ reasonValid: value => {
const res = isVideoAbuseReasonValid(value)
if (res === false) throw new Error('Video abuse reason is not valid.')
}
listForApi
]
const instanceMethods = [
- toFormatedJSON
+ toFormattedJSON
]
addMethodsToModel(VideoAbuse, classMethods, instanceMethods)
// ------------------------------ METHODS ------------------------------
-toFormatedJSON = function (this: VideoAbuseInstance) {
+toFormattedJSON = function (this: VideoAbuseInstance) {
let reporterPodHost
if (this.Pod) {