Fixed servedItem log

This commit is contained in:
Bryan Ashby 2018-01-11 21:12:07 -07:00
parent ad60e5a7df
commit 30fd001db3
1 changed files with 12 additions and 10 deletions

View File

@ -152,16 +152,18 @@ class FileAreaWebAccess {
return cb(Errors.Invalid('Invalid or unknown hash ID')); return cb(Errors.Invalid('Invalid or unknown hash ID'));
} }
return cb( const servedItem = {
null,
{
hashId : hashId, hashId : hashId,
userId : decoded[0], userId : decoded[0],
hashIdType : decoded[1], hashIdType : decoded[1],
fileIds : decoded.slice(2),
expireTimestamp : moment(result.expire_timestamp), expireTimestamp : moment(result.expire_timestamp),
};
if(FileAreaWebAccess.getHashIdTypes().SingleFile === servedItem.hashIdType) {
servedItem.fileIds = decoded.slice(2);
} }
);
return cb(null, servedItem);
} }
); );
} }