195 instance_operation validate-cfs
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user