- Add uploadHeader.cfm API for 1200px header images - Add saveBrandColor.cfm API for hex color storage - Add Branding section to menu builder sidebar - Fix header upload path and permissions - Various beacon and service point API improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.6 KiB
Text
49 lines
1.6 KiB
Text
<cfsetting showdebugoutput="false">
|
|
<cfsetting enablecfoutputonly="true">
|
|
|
|
<cfcontent type="application/json; charset=utf-8" reset="true">
|
|
<cfheader name="Cache-Control" value="no-store">
|
|
|
|
<cfscript>
|
|
function apiAbort(obj) {
|
|
writeOutput(serializeJSON(obj));
|
|
abort;
|
|
}
|
|
|
|
if (!structKeyExists(request, "BusinessID") || !isNumeric(request.BusinessID) || request.BusinessID LTE 0) {
|
|
apiAbort({ OK=false, ERROR="no_business_selected" });
|
|
}
|
|
</cfscript>
|
|
|
|
<cfquery name="q" datasource="payfrit">
|
|
SELECT
|
|
lt.lt_Beacon_Businesses_ServicePointID,
|
|
lt.BeaconID,
|
|
lt.BusinessID,
|
|
lt.ServicePointID,
|
|
lt.lt_Beacon_Businesses_ServicePointNotes,
|
|
b.BeaconName,
|
|
b.BeaconUUID,
|
|
sp.ServicePointName
|
|
FROM lt_Beacon_Businesses_ServicePoints lt
|
|
JOIN Beacons b ON b.BeaconID = lt.BeaconID
|
|
LEFT JOIN ServicePoints sp ON sp.ServicePointID = lt.ServicePointID
|
|
WHERE lt.BusinessID = <cfqueryparam cfsqltype="cf_sql_integer" value="#request.BusinessID#">
|
|
ORDER BY b.BeaconName, sp.ServicePointName
|
|
</cfquery>
|
|
|
|
<cfset assignments = []>
|
|
<cfloop query="q">
|
|
<cfset arrayAppend(assignments, {
|
|
"lt_Beacon_Businesses_ServicePointID" = q.lt_Beacon_Businesses_ServicePointID,
|
|
"BeaconID" = q.BeaconID,
|
|
"BusinessID" = q.BusinessID,
|
|
"ServicePointID" = q.ServicePointID,
|
|
"BeaconName" = q.BeaconName,
|
|
"BeaconUUID" = q.BeaconUUID,
|
|
"ServicePointName"= q.ServicePointName,
|
|
"lt_Beacon_Businesses_ServicePointNotes" = q.lt_Beacon_Businesses_ServicePointNotes
|
|
})>
|
|
</cfloop>
|
|
|
|
<cfoutput>#serializeJSON({ OK=true, ERROR="", COUNT=arrayLen(assignments), ASSIGNMENTS=assignments })#</cfoutput>
|