Sha256: 3c991a390990d976096af6f682666f98f3fac6f459619932a504214cf5f7d3dc

Contents?: true

Size: 384 Bytes

Versions: 2

Compression:

Stored size: 384 Bytes

Contents

import Mutation from './mutation';

import pageflow from 'pageflow';

export default class extends Mutation {
  perform() {
    this._getPage().configuration.set(this.props.attributes);
  }

  _getPage() {
    var page = pageflow.pages.get(this.props.pageId);

    if (!page) {
      throw new Error(`Could not find page with id ${this.props.pageId}.`);
    }

    return page;
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pageflow-react-0.1.1 js/src/mutations/update_page_mutation.js
pageflow-react-0.1.0 js/src/mutations/update_page_mutation.js