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