feat(auth): add user and role management
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import Context from '../../types/express/context';
|
||||
|
||||
type Params = {
|
||||
input: {
|
||||
email: string;
|
||||
password: string;
|
||||
fullName: string;
|
||||
};
|
||||
};
|
||||
|
||||
const updateCurrentUser = async (
|
||||
_parent: unknown,
|
||||
params: Params,
|
||||
context: Context
|
||||
) => {
|
||||
const user = await context.currentUser.$query().patchAndFetch({
|
||||
email: params.input.email,
|
||||
password: params.input.password,
|
||||
fullName: params.input.fullName,
|
||||
});
|
||||
|
||||
return user;
|
||||
};
|
||||
|
||||
export default updateCurrentUser;
|
Reference in New Issue
Block a user