Skip to content

Commit

Permalink
fix(server): Replace deprecated findByIdAndRemove with findByIdAndDelete
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed Jan 27, 2025
1 parent eb6c606 commit f0343fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/openneuro-server/src/graphql/resolvers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const users = (obj, args, { userInfo }) => {

export const removeUser = (obj, { id }, { userInfo }) => {
if (userInfo.admin) {
return User.findByIdAndRemove(id).exec()
return User.findByIdAndDelete(id).exec()
} else {
return Promise.reject(new Error("You must be a site admin to remove users"))
}
Expand Down

0 comments on commit f0343fd

Please sign in to comment.