username-fix
This commit is contained in:
commit
5c97536d76
|
@ -1,8 +1,8 @@
|
|||
import { gql } from '@urql/core'
|
||||
|
||||
export default gql`
|
||||
mutation RegisterMutation($email: String!, $password: String, $username: String) {
|
||||
registerUser(email: $email, password: $password, username: $username) {
|
||||
mutation RegisterMutation($email: String!, $password: String, $name: String) {
|
||||
registerUser(email: $email, password: $password, name: $name) {
|
||||
error
|
||||
token
|
||||
user {
|
||||
|
|
|
@ -261,7 +261,7 @@ export type MutationRateUserArgs = {
|
|||
export type MutationRegisterUserArgs = {
|
||||
email: Scalars['String']
|
||||
password?: InputMaybe<Scalars['String']>
|
||||
username?: InputMaybe<Scalars['String']>
|
||||
name?: InputMaybe<Scalars['String']>
|
||||
}
|
||||
|
||||
export type MutationRemoveAuthorArgs = {
|
||||
|
|
|
@ -65,9 +65,10 @@ export const apiClient = {
|
|||
|
||||
return response.data.signIn
|
||||
},
|
||||
authRegister: async ({ email, password = '', username = '' }): Promise<AuthResult> => {
|
||||
authRegister: async ({ email, password = '', name = '' }): Promise<AuthResult> => {
|
||||
// NOTE: name is to display
|
||||
const response = await publicGraphQLClient
|
||||
.mutation(authRegisterMutation, { email, password, username })
|
||||
.mutation(authRegisterMutation, { email, password, name })
|
||||
.toPromise()
|
||||
return response.data.registerUser
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user