logs-content: Enabled altering of history (added edit options for log posts)
This commit is contained in:
@@ -43,6 +43,28 @@ class PostAPI {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Call `editPost(input)` mutation, returns the id and edited fields of the post
|
||||
*
|
||||
* @param {{id:string, time:Date, kind:string, nick:string, text:string}} input
|
||||
* @returns {Promise<{id:string, time:Date, kind:string, nick:string, text:string}>}
|
||||
*/
|
||||
edit(input) {
|
||||
return query(`
|
||||
mutation RemovePost($input: PostEditInput!) {
|
||||
editPost(input: $input) {
|
||||
id
|
||||
time
|
||||
kind
|
||||
nick
|
||||
text
|
||||
}
|
||||
}
|
||||
`, {input}, {permissions: ["post.edit"]}).then(({editPost}) => {
|
||||
return editPost
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Call `removePost(input)` mutation, returns the id of the affected post.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user