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