mirror of
https://github.com/wassname/talk.git
synced 2026-10-27 13:20:15 +08:00
fixed merge issue
This commit is contained in:
1 parent
3e2ed222ed
commit
e90ce7f4c3
1 file changed
-13
@@ -79,19 +79,6 @@ const RootQuery = {
|
||||
return user;
|
||||
},
|
||||
|
||||
myIgnoredUsers: async (_, args, {user, loaders: {Users}}) => {
|
||||
if (!user) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// get currentUser again since context.user was out of date when running test/graph/mutations/ignoreUser
|
||||
const currentUser = (await Users.getByQuery({ids: [user.id], limit: 1}))[0];
|
||||
if (!(currentUser && Array.isArray(currentUser.ignoresUsers) && currentUser.ignoresUsers.length)) {
|
||||
return [];
|
||||
}
|
||||
return await Users.getByQuery({ids: currentUser.ignoresUsers});
|
||||
},
|
||||
|
||||
// this returns an arbitrary user
|
||||
user(_, {id}, {user, loaders: {Users}}) {
|
||||
if (user == null || !user.hasRoles('ADMIN')) {
|
||||
|
||||
Reference in new issue
Block a user