Sha256: 72aded1626632b5d400f0d234c8fdcfa9b7c251dd7b4900a9f062f5cee626e67

Contents?: true

Size: 617 Bytes

Versions: 24

Compression:

Stored size: 617 Bytes

Contents

export default (api) => ({
  find: async (locally) => {
    // NOTE: we save a request to the API by attaching the site to the Window object
    if (locally) return window.site

    console.log('[SiteService] Fetching current site')

    return api.get(`/site`).then(({ data }) => data)
  },
  updateStyle(style) {
    return api.put(`/style`, { site: { style } }).then((response) => {
      return response.headers['lock-version']
    })
  },
  publish() {
    return api.post(`/publication`).then(({ data }) => data)
  },
  getLastPublication() {
    return api.get(`/publication`).then(({ data }) => data)
  },
})

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/frontend/editor/services/site.js
maglevcms-1.7.2 app/frontend/editor/services/site.js
maglevcms-1.7.1 app/frontend/editor/services/site.js
maglevcms-1.7.0 app/frontend/editor/services/site.js
maglevcms-1.6.1 app/frontend/editor/services/site.js
maglevcms-1.6.0 app/frontend/editor/services/site.js
maglevcms-1.5.1 app/frontend/editor/services/site.js
maglevcms-1.4.0 app/frontend/editor/services/site.js
maglevcms-1.3.0 app/frontend/editor/services/site.js
maglevcms-1.2.2 app/frontend/editor/services/site.js
maglevcms-1.2.1 app/frontend/editor/services/site.js
maglevcms-1.2.0 app/frontend/editor/services/site.js
maglevcms-1.1.7 app/frontend/editor/services/site.js
maglevcms-1.1.6 app/frontend/editor/services/site.js
maglevcms-1.1.5 app/frontend/editor/services/site.js
maglevcms-1.1.4 app/frontend/editor/services/site.js
maglevcms-1.1.3 app/frontend/editor/services/site.js
maglevcms-1.1.2 app/frontend/editor/services/site.js
maglevcms-1.1.1 app/frontend/editor/services/site.js
maglevcms-1.1.0 app/frontend/editor/services/site.js