oren — 4/8/2022, 5:11:39 PM

figured out how to get the admin messages api

const token = document.cookie.split("=")[1];
fetch('https://api.wasteof.money/messages/admin', {
    headers: {'Authorization': token}
})
    .then(res => res.json())
    .then(data => {console.log(data)})
♥ 3 ↩ 0 💬 1 comment

comments

jeffalo:

at least specify that the token cookie is called “token” lol.

const token = document.cookie.split("token=")[1];
fetch('https://api.wasteof.money/messages/admin', {
    headers: {'Authorization': token}
})
    .then(res => res.json())
    .then(data => {console.log(data)})
4/9/2022, 9:29:21 AM