lib/api/model.js
function formAsPromise (req, modelName, formDsl) {

    return new Promise((resolve, reject) => {

        form(req, modelName, (err, decoratedForm) => {

            if (err) {
                return reject(err);
            }

            return resolve(decoratedForm);

        }, formDsl);

    });

}
function formAsPromise (req, modelName, formDsl) {

    return new Promise((resolve, reject) => {

        form(req, modelName, (err, decoratedForm) => {

            if (err) {
                return reject(err);
            }

            return resolve(decoratedForm);

        }, formDsl);

    });

}
function formAsPromise ( req , modelName , formDsl ) { return new Promise ( ( resolve , reject ) => { form ( req , modelName , ( err , decoratedForm ) => { if ( err ) { return reject ( err ) ; } return resolve ( decoratedForm ) ; } , formDsl ) ; } ) ; }
Promise version of `form`.
See `form`.
@param  {Object}   req       A HTTP request object which can be used to customised the form
@param  {String}   modelName The name of the model
@return {Promise} A promise with the decorated form DSL.
Promise version of form . See form .