(id)
| 7 | } |
| 8 | |
| 9 | const acceptSuggestion = async (id) => { |
| 10 | const url = `${api_endpoint}/api/accept_suggestion` |
| 11 | const body = { |
| 12 | id, |
| 13 | } |
| 14 | const response = await fetch(url, { |
| 15 | method: 'POST', |
| 16 | headers: { |
| 17 | 'Content-Type': 'application/json', |
| 18 | }, |
| 19 | body: JSON.stringify(body), |
| 20 | }) |
| 21 | const data = await response.json() |
| 22 | console.log(data) |
| 23 | return "success" |
| 24 | } |
| 25 | |
| 26 | |
| 27 |