Created
March 9, 2023 22:10
-
-
Save femakin/0f4c1dcdf1ab318327edd4c2cb3d3be1 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 { JobList } from "../../../Backend/Backend/models"; | |
export default async function addnewjob(data) { | |
try { | |
await DataStore.save( | |
new JobList({ | |
JobPosition: `${data.jobPosition}`, | |
Category: `${data.Category}`, | |
Location: `${data.Location}`, | |
Experience: `${data.Experience}`, | |
JobStatus: `${data.JobStatus}`, | |
Agency: `${data.Agency}`, | |
Description: `${data.Description}`, | |
}) | |
); | |
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