frontend/api.js
// + Creates a new entry and adds it to the address book specified by `book_id`. Returns the `book_id`.
+ Creates a new entry and adds it to the address book specified by `book_id`.
+ Creates a new entry and adds it to the address book specified by ` book_id ` .
async function newEntry (id, entry) {
  const response = await fetch('http://localhost:3600/new_entry', {
    method: 'POST',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ book_id: id, entry_data: entry })
  })
  return await response.json()
}
async function newEntry ( id , entry ) { const response = await fetch ( 'http://localhost:3600/new_entry' , { method : 'POST' , headers : { Accept : 'application/json' , 'Content-Type' : 'application/json' } , body : JSON . stringify ( { book_id : id , entry_data : entry } ) } ) return await response . json ( ) }
+ Creates a new entry and adds it to the address book specified by `book_id`.
+ Creates a new entry and adds it to the address book specified by ` book_id ` .