@@ -43,24 +43,29 @@ export async function action({ request, params }: ActionFunctionArgs) {
4343
4444 const deploymentService = new DeploymentService ( ) ;
4545
46- const result = await deploymentService . startDeployment ( authenticatedEnv , deploymentId , body . data ) ;
47- return result . match (
48- ( ) => {
49- return json ( null , { status : 204 } ) ;
50- } ,
51- ( error ) => {
52- switch ( error . type ) {
53- case "failed_to_extend_deployment_timeout" :
54- return json ( null , { status : 204 } ) ; // ignore these errors for now
55- case "deployment_not_found" :
56- return json ( { error : "Deployment not found" } , { status : 404 } ) ;
57- case "deployment_not_pending" :
58- return json ( { error : "Deployment is not pending" } , { status : 409 } ) ;
59- case "other" :
60- default :
61- error . type satisfies "other" ;
62- return json ( { error : "Internal server error" } , { status : 500 } ) ;
46+ await deploymentService
47+ . startDeployment ( authenticatedEnv , deploymentId , {
48+ contentHash : body . data . contentHash ,
49+ git : body . data . gitMeta ,
50+ runtime : body . data . runtime ,
51+ } )
52+ . match (
53+ ( ) => {
54+ return json ( null , { status : 204 } ) ;
55+ } ,
56+ ( error ) => {
57+ switch ( error . type ) {
58+ case "failed_to_extend_deployment_timeout" :
59+ return json ( null , { status : 204 } ) ; // ignore these errors for now
60+ case "deployment_not_found" :
61+ return json ( { error : "Deployment not found" } , { status : 404 } ) ;
62+ case "deployment_not_pending" :
63+ return json ( { error : "Deployment is not pending" } , { status : 409 } ) ;
64+ case "other" :
65+ default :
66+ error . type satisfies "other" ;
67+ return json ( { error : "Internal server error" } , { status : 500 } ) ;
68+ }
6369 }
64- }
65- ) ;
70+ ) ;
6671}
0 commit comments