lib/services/metadata.js
function publishLayout(uri, user) {
  const NOW = new Date().toISOString(),
    users = [userOrRobot(user)],
    update = {
      published: true,
      publishTime: NOW,
      history: [{ action: 'publish', timestamp: NOW, users }]
    };

  return changeMetaState(uri, update);
}
function publishLayout(uri, user) {
  const NOW = new Date().toISOString(),
    users = [userOrRobot(user)],
    update = {
      published: true,
      publishTime: NOW,
      history: [{ action: 'publish', timestamp: NOW, users }]
    };

  return changeMetaState(uri, update);
}
function publishLayout ( uri , user ) { const NOW = new Date ( ) . toISOString ( ) , users = [ userOrRobot ( user ) ] , update = { published : true , publishTime : NOW , history : [ { action : 'publish' , timestamp : NOW , users } ] } ; return changeMetaState ( uri , update ) ; }
Update the layouts meta object
on publish

@param {String} uri
@param {Object} user
@returns {Promise}
Update the layouts meta object on publish