get-shout-data-fix-6

This commit is contained in:
Untone 2024-03-04 20:18:26 +03:00
parent 24f4a13ee5
commit 7d642243ae

View File

@ -75,7 +75,6 @@ const server = Server.configure({
get_shout(shout_id: ${shout_id}) {
id
slug
created_by { id }
authors { id }
}
}
@ -85,8 +84,8 @@ const server = Server.configure({
.then(res => res.json())
.then((data) => {
console.debug('shout data:', data)
const { authors, created_by } = data.get_shout;
if (authors.some(author => author.id === author_id) || created_by.id === author_id) {
const { authors } = data.get_shout;
if (authors.some(author => author.id === author_id)) {
return resolve({
id: user,
author: author_id,