mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
update backend with the can() method
This commit is contained in:
@@ -45,7 +45,7 @@ const deleteAction = ({user}, {id}) => {
|
||||
};
|
||||
|
||||
module.exports = (context) => {
|
||||
if (context.user && context.user.can('mutation:createAction', 'mutation:deleteAction')) {
|
||||
if (context.user && context.user.can('CREATE_ACTION', 'DELETE_ACTION')) {
|
||||
return {
|
||||
Action: {
|
||||
create: (action) => createAction(context, action),
|
||||
|
||||
Reference in New Issue
Block a user