cleanup: удалены закомментированные фрагменты кода (104 блока в 14 файлах)

This commit is contained in:
“Naeel”
2026-05-19 17:37:36 +04:00
parent e3a9593ba4
commit eb0f2f178b
14 changed files with 26 additions and 788 deletions
+1 -19
View File
@@ -1,11 +1,8 @@
<cfcomponent extends="taffy.core.resource" taffy:uri="/services/{svcId}">
<cfsilent>
<cfimport prefix="m" taglib="../lib"/>
<cfset this.helper=CreateObject("component","lib.rest_api_helper")/>
</cfsilent>
<cffunction name="get" hint="Сервис"><!--- *** TODO проверка принадлежности тенанту --->
<cfargument name="svcId" type="string" required=true hint="type:integer"/>
<cftry>
@@ -14,10 +11,6 @@
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
</cfcatch>
</cftry>
<!--- <cfdump var=#arguments#/> <cfabort/> --->
<cfquery name="local.qSvc" result="local.result">
select
<m:field_set titleMapOut="local.titleMap" lengthOut="local.fieldCount">
@@ -37,7 +30,6 @@
from svc s
where svc_id=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.svcId#" null=#!isValid('integer',arguments.svcId)#/>
</cfquery>
<cfquery name="local.qSvcOperation" result="local.result">
select
<m:field_set titleMapOut="local.operationsMap" lengthOut="local.fieldCount">
@@ -50,29 +42,19 @@
from svc_operation j
where j.svc_id=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.svcId#" null=#!isValid('integer',arguments.svcId)#/>
</cfquery>
<cfif local.qSvc.recordCount EQ 0>
<cfreturn representationOf(this.helper.formatMessage("Not Found")).withStatus(404)/>
</cfif>
<cfset var out=structNew("linked")/>
<cfset "out.queryDurationMs"=getTickCount() - request.startTickCount/>
<!--- <cfset var rec={}/>
<cfset this.helper.appendRecord(rec, "", local.titleMap, local.qSvc, this.helper.snake2camel)/>
<cfset "out.svc"=rec/> --->
<cfset "out.svc" = this.helper.appendRecord(
structNew("linked"), "", local.titleMap, local.qSvc, this.helper.snake2camel
)/>
<cfset "out.svc.operations"=[]/>
<cfloop query=#local.qSvcOperation#>
<cfset arrayAppend(out.svc.operations, this.helper.appendRecord(structNew("linked"), "", local.operationsMap, local.qSvcOperation, this.helper.snake2camel))/>
</cfloop>
<cfset "out.runDurationMs"=getTickCount() - request.startTickCount/>
<cfreturn representationOf(out) />
</cffunction>
</cfcomponent>
</cfcomponent>