So I tried this which has the item I believe, but I still get nothing
export function post_swiftsubmissionapi ( request ) {
let options = {
“headers” : {
“Content-Type” : “application/json”
}
};
// get the request body
return request.body . text ()
. then ( ( body ) => {
// insert the item in a collection
return wixData . insert ( “SwiftSubmissionTest” , JSON . parse ( body ));
} )
. then ( ( results ) => {
options.body = {
“id” : results._id ,
“firstName” : results.firstName ,
“lastName” : results.lastName
};
return created ( options );
} )
// something went wrong
. catch ( ( error ) => {
options.body = {
“error” : error
};
return serverError ( options );
} );
}
here is the new error:
);
“x-wix-function-user-error” = (
“source=response”
);
“x-wix-request-id” = (
“1670766930.9353141962221326479”
);
} }