102 cleaning

This commit is contained in:
msyu
2025-04-30 12:27:10 +03:00
parent 063474d704
commit 7b9e811cce
10 changed files with 51 additions and 113 deletions
+1 -8
View File
@@ -115,16 +115,12 @@
<cffunction name="post" hint="Создание нового букмарка.">
<!--- <cfargument name="bookmarkUid" type="string" required=true hint="type:guid"/> --->
<!--- <cfargument name="svcOperationCfsParamId" type="string" required=true hint="type:integer"/> --->
<cfargument name="bookmark" type="string" required=true hint="type:string description: заголовок"/><!--- чистить против XSS --->
<cfargument name="descr" type="string" required=false default="" hint="type:boolean description: пользовательское примечание"/>
<cfargument name="url" type="string" required=false default="" hint="type:string description: url"/><!--- чистить против XSS --->
<cfargument name="iconUrl" type="string" required=false default="" hint="type:string description: url иконки"/><!--- чистить против XSS --->
<cfargument name="sort" type="string" required=false default="100" hint="type:integer description: целое число для сортировки"/>
<cfargument name="isEnabled" type="string" required=false default="1" hint="type:boolean description: вкл"/>
<!--- arguments.contragentId injected implicitly --->
<!--- arguments.usrId injected implicitly --->
<cftry>
<cfset this.helper.validateField(arguments, "bookmarkUid", "guid")/>
@@ -140,7 +136,6 @@
<cfset local.bookmarkUid=#createGUID()#/>
<cftry>
<cfquery name="local.qSave">
insert into bookmark (
bookmark_uid,contragent_id, bookmark,url,icon_url,descr,sort,is_enabled,dt_created,creator_id
@@ -157,9 +152,7 @@
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.usrId#" />
);
</cfquery>
<!--- <cfcatch type="invalidParamValue">
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
</cfcatch> --->
<cfcatch type="any">
<cfreturn representationOf(this.helper.formatException(cfcatch, "Internal Error")).withStatus(500)/>
</cfcatch>