src/railcontent.js
/**
 * Delete the permission and all the links with contents
 *
 * @param {Object} params - Function parameters
 * @param {String} params.url - The endpoint url
 * @param {String|Number} params.id - Id of the permission you want to delete
 * @returns {Promise} Response or Error Object
 */
Delete the permission and all the links with contents
@param {Object} params - Function parameters
@param {String} params.url - The endpoint url
@param {String|Number} params.id - Id of the permission you want to delete
@returns {Promise} Response or Error Object
Delete the permission and all the links with contents @param { Object } params - Function parameters @param { String } params . url - The endpoint url @param { String|Number } params . id - Id of the permission you want to delete @returns { Promise } Response or Error Object
function deletePermission({
    url = '',
    id,
}) {
    return new Promise((resolve) => {
        axios
            .put(`${url}/railcontent/permission/${id}`)
            .then((response) => {
                resolve({ response });
            })
            .catch((error) => {
                resolve({ error });
            });
    });    
}
function deletePermission ( { url = '' , id , } ) { return new Promise ( ( resolve ) => { axios . put ( ` ${ url } ${ id } ` ) . then ( ( response ) => { resolve ( { response } ) ; } ) . catch ( ( error ) => { resolve ( { error } ) ; } ) ; } ) ; }
Delete the permission and all the links with contents
 @param {Object} params - Function parameters
 @param {String} params.url - The endpoint url
 @param {String|Number} params.id - Id of the permission you want to delete
 @returns {Promise} Response or Error Object
Delete the permission and all the links with contents @param { Object } params - Function parameters @param { String } params . url - The endpoint url @param { String|Number } params . id - Id of the permission you want to delete @returns { Promise } Response or Error Object