This commit is contained in:
msyu
2024-10-23 11:17:42 +03:00
commit ab5c944862
380 changed files with 55823 additions and 0 deletions
@@ -0,0 +1,17 @@
<cfcomponent extends="taffy.core.api">
<cfscript>
this.name = hash(getCurrentTemplatePath());
variables.framework = {};
variables.framework.exceptionLogAdapter = "taffy.bonus.LogToEmail";
variables.framework.exceptionLogAdapterConfig = StructNew();
variables.framework.exceptionLogAdapterConfig.emailFrom = "api-error@yourdomain.com";
variables.framework.exceptionLogAdapterConfig.emailTo = "you@yourdomain.com";
variables.framework.exceptionLogAdapterConfig.emailSubj = "Exception Trapped in API";
variables.framework.exceptionLogAdapterConfig.emailType = "html";
</cfscript>
</cfcomponent>
@@ -0,0 +1,10 @@
<cfcomponent extends="taffy.core.resource" taffy_uri="/foo">
<cffunction name="get" access="public" output="false">
<cfset local.exception = {} />
<cfset local.exception.message = "testing log to email from resource saveLog()" />
<cfset saveLog(local.exception) />
<cfreturn noData().withStatus(200, "Log Saved") />
</cffunction>
</cfcomponent>