How to use the ghost/models/base.apiRoot function in ghost

To help you get started, we’ve selected a few ghost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cobyism / ghost-on-heroku / core / client / models / settings.js View on Github external
importFrom: function (file) {
        var formData = new FormData();
        formData.append('importfile', file);
        return ic.ajax.request(BaseModel.apiRoot + '/db/', {
            headers: {
                'X-CSRF-Token': $('meta[name="csrf-param"]').attr('content')
            },
            type: 'POST',
            data: formData,
            dataType: 'json',
            cache: false,
            contentType: false,
            processData: false
        });
    },
    sendTestEmail: function () {
github cobyism / ghost-on-heroku / core / client / models / settings.js View on Github external
var validator = window.validator;

import BaseModel from 'ghost/models/base';

var SettingsModel = BaseModel.extend({
    url: BaseModel.apiRoot + '/settings/?type=blog,theme,app',

    title: null,
    description: null,
    email: null,
    logo: null,
    cover: null,
    defaultLang: null,
    postsPerPage: null,
    forceI18n: null,
    permalinks: null,
    activeTheme: null,
    activeApps: null,
    installedApps: null,
    availableThemes: null,
    availableApps: null,