payfrit-works/api/addresses/states.cfm
John Mizerek 8092384702 Add team endpoint and chat features for portal
- Add /api/portal/team.cfm for employee listing
- Add chat endpoints (getMessages, sendMessage, markRead, getActiveChat)
- Add OTP authentication endpoints
- Add address management endpoints (delete, setDefault, states)
- Add task completion and chat task endpoints
- Update Application.cfm allowlist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 17:03:55 -08:00

35 lines
865 B
Text

<cfsetting showdebugoutput="false">
<cfsetting enablecfoutputonly="true">
<cfcontent type="application/json; charset=utf-8">
<!--- List US states for address forms --->
<cfscript>
try {
qStates = queryExecute("
SELECT tt_StateID as StateID, tt_StateAbbreviation as StateAbbreviation, tt_StateName as StateName
FROM tt_States
ORDER BY tt_StateName
", {}, { datasource: "payfrit" });
states = [];
for (row in qStates) {
arrayAppend(states, {
"StateID": row.StateID,
"Abbr": row.StateAbbreviation,
"Name": row.StateName
});
}
writeOutput(serializeJSON({
"OK": true,
"STATES": states
}));
} catch (any e) {
writeOutput(serializeJSON({
"OK": false,
"ERROR": "server_error",
"MESSAGE": e.message
}));
}
</cfscript>