cleanup: удалены закомментированные фрагменты кода (104 блока в 14 файлах)
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
<cfcomponent extends="taffy.core.resource" taffy:uri="/instanceOperationCfsParams/{instanceOperationCfsParamUid}/subparams">
|
||||
<!--- забавно, что мы организуем эндпойнт коллекции только ради операции создания. Список (коллекция) отдельно не используется, а выгружается в составе более высокоуровневых сущностей --->
|
||||
|
||||
|
||||
<cfsilent>
|
||||
<cfimport prefix="m" taglib="../lib"/>
|
||||
<cfset this.helper=CreateObject("component","lib.rest_api_helper")/>
|
||||
</cfsilent>
|
||||
|
||||
|
||||
<cffunction name="post" hint="создание метаданных субпараметра CFS параметра операции инстанса">
|
||||
<cfargument name="instanceOperationCfsParamUid" type="string" required=true hint="type:guid"/>
|
||||
<cfargument name="subparam" type="string" required=true hint="type:string"/>
|
||||
<cfargument name="isSensitive" type="boolean" required=false default=false hint="type:boolean"/>
|
||||
<cfargument name="note" type="string" required=false default="" hint="type:string"/>
|
||||
<!--- arguments.specificationId injected implicitly --->
|
||||
|
||||
<!--- <cfargument name="instanceOperationCfsParamUid" type="string" required=true hint="type:guid"/>
|
||||
<cfargument name="subparam" type="string" required=true hint="type:string"/>
|
||||
<cfargument name="isSensitive" type="boolean" required=true/>
|
||||
<cfargument name="note" type="string" required=false default=""/> --->
|
||||
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "instanceOperationCfsParamUid", "guid")/>
|
||||
<cfset this.helper.validateField(arguments, "isSensitive", "boolean")/>
|
||||
@@ -27,9 +17,7 @@
|
||||
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
|
||||
</cfcatch>
|
||||
</cftry>
|
||||
|
||||
<cfset local={}/>
|
||||
|
||||
<cfquery name="local.qCheckAccess" result="local.result">
|
||||
select count(*) as cnt
|
||||
from instance_operation_cfs_param iop
|
||||
@@ -42,7 +30,6 @@
|
||||
<cfif local.qCheckAccess.cnt EQ 0>
|
||||
<cfreturn representationOf(this.helper.formatMessage("Instance CFS parameter not found or access denied")).withStatus(404)/>
|
||||
</cfif>
|
||||
|
||||
<cfquery name="local.qCheckDuplicates" result="local.result">
|
||||
select count(*) as cnt
|
||||
from instance_operation_cfs_subparam ios
|
||||
@@ -52,7 +39,6 @@
|
||||
<cfif local.qCheckDuplicates.cnt GT 0>
|
||||
<cfreturn representationOf(this.helper.formatMessage("Subparameter already exists")).withStatus(400)/>
|
||||
</cfif>
|
||||
|
||||
<cfquery name="local.qSave" result="local.result">
|
||||
insert into instance_operation_cfs_subparam
|
||||
(instance_operation_cfs_param_uid, instance_operation_cfs_subparam, is_sensitive, note, dt_created, creator_id, dt_updated, updater_id)
|
||||
@@ -68,14 +54,8 @@
|
||||
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.usrId#" />
|
||||
);
|
||||
</cfquery>
|
||||
|
||||
|
||||
|
||||
<cfreturn noData()
|
||||
.withStatus(201, "Created")
|
||||
/>
|
||||
</cffunction><!--- get --->
|
||||
|
||||
|
||||
|
||||
</cfcomponent>
|
||||
</cfcomponent>
|
||||
|
||||
Reference in New Issue
Block a user