function editFavorites(e){
    let editID = e.target.parentNode.id.slice(9)
    fetch('/api/edit', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            workid: editID
        })
    }).then(() => window.location.href = '/static/api/edit')
}
/**
 * On click of the pencil icon
 * Post the info of the clicked work to the server
 * Once the server gets the info go to the dynamically created edit page 
 */
On click of the pencil icon
Post the info of the clicked work to the server
Once the server gets the info go to the dynamically created edit page
On click of the pencil icon Post the info of the clicked work to the server Once the server gets the info go to the dynamically created edit page
function editFavorites(e){
    let editID = e.target.parentNode.id.slice(9)
    fetch('/api/edit', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            workid: editID
        })
    }).then(() => window.location.href = '/static/api/edit')
}
function editFavorites ( e ) { let editID = e . target . parentNode . id . slice ( 9 ) fetch ( '/api/edit' , { method : 'POST' , headers : { 'Content-Type' : 'application/json' } , body : JSON . stringify ( { workid : editID } ) } ) . then ( ( ) => window . location . href = '/static/api/edit' ) }
On click of the pencil icon
 Post the info of the clicked work to the server
 Once the server gets the info go to the dynamically created edit page
On click of the pencil icon Post the info of the clicked work to the server Once the server gets the info go to the dynamically created edit page