frontend/api.js
// + Sorts an address book on sort_key, orderd by order_by
+ Sorts an address book on sort_key, orderd by order_by
+ Sorts an address book on sort_key orderd by order_by
async function sortBook (book_id, sort_key, order_by) {
  const response = await fetch('http://localhost:3600/sort', {
    method: 'POST',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ book_id: book_id, sort_key: sort_key, order_by: order_by })
  })
  return await response.json()
}
async function sortBook ( book_id , sort_key , order_by ) { const response = await fetch ( 'http://localhost:3600/sort' , { method : 'POST' , headers : { Accept : 'application/json' , 'Content-Type' : 'application/json' } , body : JSON . stringify ( { book_id : book_id , sort_key : sort_key , order_by : order_by } ) } ) return await response . json ( ) }
+ Sorts an address book on sort_key, orderd by order_by
+ Sorts an address book on sort_key orderd by order_by