frontend/api.js
// and the provided filename is used instead
and the provided filename is used instead
and the provided filename is used instead
async function saveBook (id, filename) {
  const response = await fetch('http://localhost:3600/save', {
    method: 'POST',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ book_id: id, filename: filename })
  })
  return await response.json()
}
async function saveBook ( id , filename ) { const response = await fetch ( 'http://localhost:3600/save' , { method : 'POST' , headers : { Accept : 'application/json' , 'Content-Type' : 'application/json' } , body : JSON . stringify ( { book_id : id , filename : filename } ) } ) return await response . json ( ) }
and the provided filename is used instead
and the provided filename is used instead