lib/services/publish.js
function _checkForArchived(uri) {
  return db.getMeta(replaceVersion(uri))
    .then(meta => meta.archived)
    .then(archived => archived
      ? bluebird.reject({ val: '', errors: { _checkForArchived: 'The page is archived and cannot be published' } })
      : bluebird.resolve({ val: '', errors: {} })
    );
}
function _checkForArchived(uri) {
  return db.getMeta(replaceVersion(uri))
    .then(meta => meta.archived)
    .then(archived => archived
      ? bluebird.reject({ val: '', errors: { _checkForArchived: 'The page is archived and cannot be published' } })
      : bluebird.resolve({ val: '', errors: {} })
    );
}
function _checkForArchived ( uri ) { return db . getMeta ( replaceVersion ( uri ) ) . then ( meta => meta . archived ) . then ( archived => archived ? bluebird . reject ( { val : '' , errors : { _checkForArchived : 'The page is archived and cannot be published' } } ) : bluebird . resolve ( { val : '' , errors : { } } ) ) ; }
Checks the archive property on a page's meta object, to determine whether
it can be published. Archived pages should not be published. Otherwise, an
initial object is passed to the processing chain in processPublishRules.

@param {String} uri
@returns {Promise}
Checks the archive property on a page s meta object to determine whether it can be published . Archived pages should not be published . Otherwise an initial object is passed to the processing chain in processPublishRules .