Skip to content

Commit

Permalink
Merge pull request #171 from craigybaeb/dev
Browse files Browse the repository at this point in the history
Fixed explainer.ts
  • Loading branch information
craigybaeb authored Nov 21, 2023
2 parents 146f608 + 9db1723 commit c8e698e
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/services/isee/explainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ const KEY = 'explainers';

export async function api_create(explainer: Explainer) {
try {
// const data = await fetch(`${BASE_URL}/${KEY}`, {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// },
// body: JSON.stringify(explainer)
// });
console.log("DATA TO SERVER ", explainer)
//const result = await data.json();
//return result || [];
const data = await fetch(`${BASE_URL}/${KEY}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(explainer)
});
const result = await data.json();
return result || [];
} catch (error) {
return [];
}
Expand Down

0 comments on commit c8e698e

Please sign in to comment.