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' },
|
||||
body: JSON.stringify({
|
||||
query: `query {
|
||||
get_shout(shout_id: $shout_id) {
|
||||
get_shout(shout_id: ${shout_id}) {
|
||||
id
|
||||
slug
|
||||
authors
|
||||
}
|
||||
}
|
||||
`,
|
||||
variables: { shout_id },
|
||||
`
|
||||
}),
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then((data) => {
|
||||
.then(({ data }) => {
|
||||
console.debug('shout data:', data)
|
||||
const { authors } = data.get_shout;
|
||||
if (authors.includes(author_id)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user