src/utils.js
/**
 * Keeps only the GET methods for the given relation
 * @param Model - The model to process.
 * @param relation - The relation to alter.
 */
Keeps only the GET methods for the given relation
@param Model - The model to process.
@param relation - The relation to alter.
Keeps only the GET methods for the given relation @param Model - The model to process . @param relation - The relation to alter .
function readOnlyRelation(Model, relation) {
	disableRemoteMethods(Model, [
		'prototype.__create__',
		'prototype.__updateById__',
		'prototype.__replaceById__',
		'prototype.__destroyById__',
		'prototype.__delete__',
		'prototype.__count__',
		'prototype.__findById__',
		'prototype.__link__',
		'prototype.__unlink__',
		'prototype.__exists__',
	].map(m => m + relation));
}
function readOnlyRelation ( Model , relation ) { disableRemoteMethods ( Model , [ 'prototype.__create__' , 'prototype.__updateById__' , 'prototype.__replaceById__' , 'prototype.__destroyById__' , 'prototype.__delete__' , 'prototype.__count__' , 'prototype.__findById__' , 'prototype.__link__' , 'prototype.__unlink__' , 'prototype.__exists__' , ] . map ( m => m + relation ) ) ; }
Keeps only the GET methods for the given relation
 @param Model - The model to process.
Keeps only the GET methods for the given relation @param Model - The model to process .