changed "embed" to "serve" for terminology accuracy

This commit is contained in:
bill bittner 2018-07-19 08:55:47 -07:00
parent 9df3d68cf0
commit 195d22bece
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
const EMBED = 'EMBED';
const SERVE = 'SERVE';
const SHOW = 'SHOW';
module.exports = {
EMBED,
SERVE,
SHOW,
};

View file

@ -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;
};