From d7128d461f1eb613ea3f0a1a97cc9156518cd355 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 16 Mar 2020 23:19:54 +0300 Subject: [PATCH] refactor(server): remove PromiseContainer class (#3416) BREAKING CHANGES: Removed PromiseContainer class as not used --- lib/middleware/common.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/middleware/common.js b/lib/middleware/common.js index eb1035a0c..3b27aede4 100644 --- a/lib/middleware/common.js +++ b/lib/middleware/common.js @@ -99,22 +99,7 @@ function setHeavyCacheHeaders (response) { response.setHeader('Cache-Control', 'public, max-age=31536000') } -class PromiseContainer { - constructor () { - this.promise = null - } - - then (success, error) { - return this.promise.then(success, error) - } - - set (newPromise) { - this.promise = newPromise - } -} - // PUBLIC API -exports.PromiseContainer = PromiseContainer exports.createServeFile = createServeFile exports.setNoCacheHeaders = setNoCacheHeaders exports.setHeavyCacheHeaders = setHeavyCacheHeaders