File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
valhalla/jawn/src/controllers/public
components/templates/gateway Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,10 @@ export class StripeController extends Controller {
146146 this . setStatus ( 400 ) ;
147147 throw new Error ( "Amount must be at least 5" ) ;
148148 }
149+ if ( body . amount > 10000 ) {
150+ this . setStatus ( 400 ) ;
151+ throw new Error ( "Amount must not exceed 10000" ) ;
152+ }
149153 const result = await stripeManager . createCloudGatewayCheckoutSession (
150154 request . headers . origin ?? "" ,
151155 body . amount ,
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ const RouterUseDialog = ({
126126
127127 < TabsContent value = "curl" className = "mt-4" >
128128 < DiffHighlight
129- code = { getRouterCode ( baseUrl , "curl" ) }
129+ code = { getRouterCode ( "curl" ) }
130130 language = "bash"
131131 newLines = { [ ] }
132132 oldLines = { [ ] }
@@ -137,7 +137,7 @@ const RouterUseDialog = ({
137137
138138 < TabsContent value = "javascript" className = "mt-4" >
139139 < DiffHighlight
140- code = { getRouterCode ( baseUrl , "javascript" ) }
140+ code = { getRouterCode ( "javascript" ) }
141141 language = "typescript"
142142 newLines = { [ ] }
143143 oldLines = { [ ] }
@@ -148,7 +148,7 @@ const RouterUseDialog = ({
148148
149149 < TabsContent value = "python" className = "mt-4" >
150150 < DiffHighlight
151- code = { getRouterCode ( baseUrl , "python" ) }
151+ code = { getRouterCode ( "python" ) }
152152 language = "python"
153153 newLines = { [ ] }
154154 oldLines = { [ ] }
Original file line number Diff line number Diff line change @@ -256,7 +256,13 @@ export default function RequestPage() {
256256 < div className = "text-sm text-destructive" > { error } </ div >
257257 ) : (
258258 < div className = "whitespace-pre-wrap text-sm" >
259- { JSON . parse ( response ) . content }
259+ { ( ( ) => {
260+ try {
261+ return JSON . parse ( response ) . content ;
262+ } catch {
263+ return response ;
264+ }
265+ } ) ( ) }
260266 </ div >
261267 ) }
262268 { isStreaming && (
You can’t perform that action at this time.
0 commit comments