File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/support/apis Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -36,22 +36,17 @@ export async function submitSupportFeedback(
3636 } ) ;
3737
3838 if ( ! response . ok ) {
39- if ( response . status === 404 ) {
40- // CSAT endpoint doesn't exist in development, log locally
41- console . log (
42- "📝 CSAT endpoint not available in development, logging locally: " ,
39+ if ( response . status === 404 && process . env . NODE_ENV !== "production" ) {
40+ // Only in non-prod, simulate success if the endpoint isn't deployed yet
41+ console . debug (
42+ "CSAT endpoint not available; treating as success in dev " ,
4343 {
4444 rating : data . rating ,
45- feedback : data . feedback ,
4645 ticket_id : data . ticketId ,
47- timestamp : new Date ( ) . toISOString ( ) ,
48- environment : "development" ,
46+ env : process . env . NODE_ENV ,
4947 } ,
5048 ) ;
51-
52- // Simulate API delay
53- await new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) ;
54-
49+ await new Promise ( ( resolve ) => setTimeout ( resolve , 300 ) ) ;
5550 return { success : true } ;
5651 }
5752
You can’t perform that action at this time.
0 commit comments