const toId = (title, year) => `${title.replace(/\s/g,'-').toLowerCase()}-${year.toLowerCase()}`
const createMovie = async (title, year) => (await fetch(`${url}/data/twilson63`, {
method: 'POST',
headers: {
'content-type': 'application/json',
authorization: `Bearer ${token}`
},
body: JSON.stringify({
id: toId(title, year),
type: 'movie',
title,
year
})
})).json()