Created
March 9, 2023 22:09
-
-
Save femakin/2d261ff4047aa615737eeddc0341f011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DataStore } from '@aws-amplify/datastore'; | |
import { ApplicantList } from '../../../Backend/Backend/models'; | |
export default async function apply(data, jobdetails) { | |
try { | |
await DataStore?.save( | |
new ApplicantList({ | |
Name: `${data.name}`, | |
Email: `${data.email}`, | |
Message: `${data.coverletter}`, | |
PortfolioLink: `${data.portfoliourl}`, | |
Status: ``, | |
JobID: `${jobdetails?.id}`, | |
}) | |
); | |
return { success: true }; | |
} catch (error) { | |
return { success: false, error }; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment