25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
<cfcomponent extends="taffy.core.resource" taffy:uri="/instanceOperations/{instanceOperationUid}/validate-cfs">
|
|
|
|
<cfsilent>
|
|
<cfimport prefix="m" taglib="../lib"/>
|
|
<cfset this.helper=CreateObject("component","lib.rest_api_helper")/><!---*** странно, почему мы его видим?---><!---вынести в апп?--->
|
|
</cfsilent>
|
|
|
|
|
|
<cffunction name="get" hint="Проверка корректности CFS">
|
|
<cfargument name="instanceOperationUid" type="string" required=true hint="type:guid"/>
|
|
|
|
<!--- <cfset var local={}/> --->
|
|
|
|
<!--- *** мы не проверяем доступ к инстансу и существование инстанса 2DO --->
|
|
|
|
<cfset var validationMessage = createObject("component","instance_operation").validateCfsParams(arguments.instanceOperationUid)/>
|
|
<cfif len(validationMessage)>
|
|
<cfreturn representationOf(this.helper.formatMessage("Inconsistent CFS parameters", #validationMessage#)).withStatus(422)/>
|
|
</cfif>
|
|
|
|
<cfreturn noData().withStatus(204, "OK") />
|
|
</cffunction>
|
|
|
|
</cfcomponent>
|