Adding autobind decorator to server

This commit is contained in:
John Lyon-Smith
2018-03-26 11:37:18 -07:00
parent 80c37f8642
commit 49ca7f3bf1
18 changed files with 51 additions and 55 deletions

View File

@@ -2,7 +2,7 @@ import Canvas from 'canvas'
import fs from 'fs'
import util from 'util'
import createError from 'http-errors'
import autoBind from 'auto-bind2'
import autobind from 'autobind-decorator'
import stream from 'stream'
function streamToBuffer(readable) {
@@ -132,11 +132,11 @@ function normalizeOrientation(image, orientation) {
return loadImage(canvas.toBuffer())
}
@autobind
export class ImageHandlers {
constructor(container) {
this.db = container.db
this.log = container.log
autoBind(this)
}
scaleImage(options) {