Merge pull request #970 from automatisch/add-signup

feat: add signup page
This commit is contained in:
Ali BARIN
2023-03-03 19:06:43 +01:00
committed by GitHub
10 changed files with 243 additions and 6 deletions

View File

@@ -4,11 +4,12 @@ type Params = {
input: {
email: string;
password: string;
fullName: string;
};
};
const createUser = async (_parent: unknown, params: Params) => {
const { email, password } = params.input;
const { email, password, fullName } = params.input;
const existingUser = await User.query().findOne({ email });
@@ -19,6 +20,7 @@ const createUser = async (_parent: unknown, params: Params) => {
const user = await User.query().insert({
email,
password,
fullName,
role: 'user',
});

View File

@@ -336,6 +336,7 @@ input DeleteStepInput {
}
input CreateUserInput {
fullName: String!
email: String!
password: String!
}