Adding autobind decorator to server
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user