get-shout-data-fix
This commit is contained in:
parent
6a815490bb
commit
7f4c5dc20f
|
@ -72,18 +72,17 @@ const server = Server.configure({
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
query: `query {
|
query: `query {
|
||||||
get_shout(shout_id: $shout_id) {
|
get_shout(shout_id: ${shout_id}) {
|
||||||
id
|
id
|
||||||
slug
|
slug
|
||||||
authors
|
authors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
variables: { shout_id },
|
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then((data) => {
|
.then(({ data }) => {
|
||||||
console.debug('shout data:', data)
|
console.debug('shout data:', data)
|
||||||
const { authors } = data.get_shout;
|
const { authors } = data.get_shout;
|
||||||
if (authors.includes(author_id)) {
|
if (authors.includes(author_id)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user