From 195d22becee1679e6805ff8f14f6c6dc1ffec5b0 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Thu, 19 Jul 2018 08:55:47 -0700 Subject: [PATCH] changed "embed" to "serve" for terminology accuracy --- server/controllers/assets/constants/request_types.js | 4 ++-- server/controllers/assets/utils/determineRequestType.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/controllers/assets/constants/request_types.js b/server/controllers/assets/constants/request_types.js index f2e4c7b0..4c32b6f1 100644 --- a/server/controllers/assets/constants/request_types.js +++ b/server/controllers/assets/constants/request_types.js @@ -1,7 +1,7 @@ -const EMBED = 'EMBED'; +const SERVE = 'SERVE'; const SHOW = 'SHOW'; module.exports = { - EMBED, + SERVE, SHOW, }; diff --git a/server/controllers/assets/utils/determineRequestType.js b/server/controllers/assets/utils/determineRequestType.js index c170c3dc..02e08fbc 100644 --- a/server/controllers/assets/utils/determineRequestType.js +++ b/server/controllers/assets/utils/determineRequestType.js @@ -1,4 +1,4 @@ -const { EMBED, SHOW } = require('../constants/request_types.js'); +const { SERVE, SHOW } = require('../constants/request_types.js'); function clientWantsAsset ({accept, range}) { const imageIsWanted = accept && accept.match(/image\/.*/) && !accept.match(/text\/html/); @@ -8,7 +8,7 @@ function clientWantsAsset ({accept, range}) { const determineRequestType = (hasFileExtension, headers) => { if (hasFileExtension || clientWantsAsset(headers)) { - return EMBED; + return SERVE; } return SHOW; };