frontend/api.js
// Returns the id of the address book imported into
Returns the id of the address book imported into
Returns the id of the address book imported into
async function importBook (filename, id) {
  const response = await fetch('http://localhost:3600/import', {
    method: 'POST',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ filename: filename, id: id })
  })
  return await response.json()
}
async function importBook ( filename , id ) { const response = await fetch ( 'http://localhost:3600/import' , { method : 'POST' , headers : { Accept : 'application/json' , 'Content-Type' : 'application/json' } , body : JSON . stringify ( { filename : filename , id : id } ) } ) return await response . json ( ) }
Returns the id of the address book imported into
Returns the id of the address book imported into