cleanup: strip remaining comment noise
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
<cfset this.helper=CreateObject("component","lib.rest_api_helper")/>
|
||||
</cfsilent>
|
||||
|
||||
<!---спецификация полей, пригодных для фильтрации (?и сортировки)--->
|
||||
<cfset this.fieldsSpec={
|
||||
bookmark_uid={prefix="b", type="guid"},
|
||||
dt_created={prefix="b", type="date"},
|
||||
@@ -20,8 +19,6 @@
|
||||
}
|
||||
/>
|
||||
|
||||
<!--- предполагается показывать букмарки только "настоящим" клиентам, поэтому используем contragent_id как признак своих--->
|
||||
|
||||
<cffunction name="get" hint="Список букмарков">
|
||||
<cfargument name="pageSize" type="string" hint="type:integer" default="100"/>
|
||||
<cfargument name="page" type="string" hint="type:integer" default="1"/>
|
||||
@@ -31,12 +28,10 @@
|
||||
<cftry>
|
||||
|
||||
|
||||
<!---разбор и проверка параметров запроса--->
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "pageSize", "integer")/>
|
||||
<cfset this.helper.validateField(arguments, "page", "integer")/>
|
||||
|
||||
<!---мы мирно игнорируем поля, отсутствующие в спецификации, что позволяет не делать исключения для orderBy и т.п.--->
|
||||
<cfset var filter=this.helper.parseFilterParams(this.fieldsSpec)/>
|
||||
|
||||
<cfcatch type="invalidParamValue">
|
||||
@@ -68,7 +63,7 @@
|
||||
from bookmark b
|
||||
where 1=1 <m:filter_build filter=#filter#/>
|
||||
AND (b.contragent_id = <cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.contragentId# null=#!isNumeric(arguments.contragentId)#/>
|
||||
OR b.contragent_id=-1)/*общая букмарка*/
|
||||
OR b.contragent_id=-1)
|
||||
order by b.contragent_id desc, b.sort asc
|
||||
limit #maxrows#
|
||||
</cfquery>
|
||||
@@ -108,10 +103,10 @@
|
||||
|
||||
|
||||
<cffunction name="post" hint="Создание нового букмарка.">
|
||||
<cfargument name="bookmark" type="string" required=true hint="type:string description: заголовок"/><!--- чистить против XSS --->
|
||||
<cfargument name="bookmark" type="string" required=true hint="type:string description: заголовок"/>
|
||||
<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="url" type="string" required=false default="" hint="type:string description: url"/>
|
||||
<cfargument name="iconUrl" type="string" required=false default="" hint="type:string description: url иконки"/>
|
||||
<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: вкл"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user