Get Post Media

This is for getting any media attached to a post. It requires the post ID, and returns an array containing arrays of the URL path and name for each attached image.

The endpoint is "get/media/{postID}". Here's an example:

// this is any valid post ID
let postID = <num>
fetch(`${baseURL}api/get/media/${postID}`)
.then((blob) => { return blob.json() })
.then((data) => {
// this will print the full path to each image returned
data.content.forEach((img) => {
console.log(`${img.path}${img.name})
})
})