get-shout-data-fix-5
This commit is contained in:
parent
962013a1aa
commit
24f4a13ee5
|
@ -75,7 +75,7 @@ const server = Server.configure({
|
||||||
get_shout(shout_id: ${shout_id}) {
|
get_shout(shout_id: ${shout_id}) {
|
||||||
id
|
id
|
||||||
slug
|
slug
|
||||||
created_by
|
created_by { id }
|
||||||
authors { id }
|
authors { id }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ const server = Server.configure({
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.debug('shout data:', data)
|
console.debug('shout data:', data)
|
||||||
const { authors, created_by } = data.get_shout;
|
const { authors, created_by } = data.get_shout;
|
||||||
if (authors.some(author => author.id === author_id) || created_by === author_id) {
|
if (authors.some(author => author.id === author_id) || created_by.id === author_id) {
|
||||||
return resolve({
|
return resolve({
|
||||||
id: user,
|
id: user,
|
||||||
author: author_id,
|
author: author_id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user