Add about.cfm API endpoint for mobile app About screennAdds server-side content for About Payfrit screen allowing content updates without releasing new app versions.nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
400df7624f
commit
0d3c381ed6
2 changed files with 70 additions and 0 deletions
|
|
@ -259,6 +259,9 @@ if (len(request._api_path)) {
|
||||||
if (findNoCase("/api/ratings/setup.cfm", request._api_path)) request._api_isPublic = true;
|
if (findNoCase("/api/ratings/setup.cfm", request._api_path)) request._api_isPublic = true;
|
||||||
if (findNoCase("/api/ratings/submit.cfm", request._api_path)) request._api_isPublic = true;
|
if (findNoCase("/api/ratings/submit.cfm", request._api_path)) request._api_isPublic = true;
|
||||||
|
|
||||||
|
// App info endpoints (public, no auth needed)
|
||||||
|
if (findNoCase("/api/app/about.cfm", request._api_path)) request._api_isPublic = true;
|
||||||
|
|
||||||
// Stripe endpoints
|
// Stripe endpoints
|
||||||
if (findNoCase("/api/stripe/onboard.cfm", request._api_path)) request._api_isPublic = true;
|
if (findNoCase("/api/stripe/onboard.cfm", request._api_path)) request._api_isPublic = true;
|
||||||
if (findNoCase("/api/stripe/status.cfm", request._api_path)) request._api_isPublic = true;
|
if (findNoCase("/api/stripe/status.cfm", request._api_path)) request._api_isPublic = true;
|
||||||
|
|
|
||||||
67
api/app/about.cfm
Normal file
67
api/app/about.cfm
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
<cfsetting showdebugoutput="false">
|
||||||
|
<cfsetting enablecfoutputonly="true">
|
||||||
|
<cfcontent type="application/json; charset=utf-8">
|
||||||
|
|
||||||
|
<!---
|
||||||
|
About Screen Content API
|
||||||
|
Returns content for the mobile app's About screen.
|
||||||
|
Edit this file to update the app's about information without releasing a new app version.
|
||||||
|
--->
|
||||||
|
<cfscript>
|
||||||
|
try {
|
||||||
|
// Features displayed on the About screen
|
||||||
|
// icon: Flutter icon name (see AboutFeature._iconMap in about_info.dart)
|
||||||
|
features = [
|
||||||
|
{
|
||||||
|
"ICON": "qr_code_scanner",
|
||||||
|
"TITLE": "Scan & Order",
|
||||||
|
"DESCRIPTION": "Scan the table beacon to browse the menu and order directly from your phone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ICON": "group",
|
||||||
|
"TITLE": "Group Orders",
|
||||||
|
"DESCRIPTION": "Invite friends to join your order and split the bill easily"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ICON": "delivery_dining",
|
||||||
|
"TITLE": "Delivery & Takeaway",
|
||||||
|
"DESCRIPTION": "Order for delivery or pick up when dining in isn't an option"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ICON": "payment",
|
||||||
|
"TITLE": "Easy Payment",
|
||||||
|
"DESCRIPTION": "Pay your share securely with just a few taps"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Contact links displayed on the About screen
|
||||||
|
// icon: Flutter icon name (see AboutContact._iconMap in about_info.dart)
|
||||||
|
contacts = [
|
||||||
|
{
|
||||||
|
"ICON": "help_outline",
|
||||||
|
"LABEL": "help.payfrit.com",
|
||||||
|
"URL": "https://help.payfrit.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ICON": "language",
|
||||||
|
"LABEL": "www.payfrit.com",
|
||||||
|
"URL": "https://www.payfrit.com"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
writeOutput(serializeJSON({
|
||||||
|
"OK": true,
|
||||||
|
"DESCRIPTION": "Payfrit makes dining out easier. Order from your table, split the bill with friends, and pay without waiting.",
|
||||||
|
"FEATURES": features,
|
||||||
|
"CONTACTS": contacts,
|
||||||
|
"COPYRIGHT": "© #year(now())# Payfrit. All rights reserved."
|
||||||
|
}));
|
||||||
|
|
||||||
|
} catch (any e) {
|
||||||
|
writeOutput(serializeJSON({
|
||||||
|
"OK": false,
|
||||||
|
"ERROR": "server_error",
|
||||||
|
"MESSAGE": e.message
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
</cfscript>
|
||||||
Reference in a new issue