Skip to content

Commit

Permalink
rename joystreamAccount to joystreamAccountId in 'AccountData' graphq…
Browse files Browse the repository at this point in the history
…l type
  • Loading branch information
zeeshanakram3 committed Jun 11, 2024
1 parent 3bfb7fd commit d872193
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/auth-server/handlers/changeAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ export const changeAccount: (
{ joystreamAccountId: payload.joystreamAccountId }
)

console.log('after update')

// Remove the old encryption artifacts
await em.delete(EncryptionArtifacts, { accountId: account.id })

Expand Down
8 changes: 5 additions & 3 deletions src/server-extension/resolvers/AccountResolver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class AccountResolver {
const account = ctx.account
const em = await this.em()
assert(account, 'Unexpected context: account is not set')
const { id, email, joystreamAccount, notificationPreferences } = account
const { id, email, joystreamAccountId, notificationPreferences } = account
let followedChannels: FollowedChannel[] = []
if (
info.fieldNodes[0].selectionSet?.selections.some(
Expand All @@ -44,7 +44,7 @@ export class AccountResolver {
return {
id,
email,
joystreamAccount,
joystreamAccountId,
followedChannels,
preferences: notificationPreferences,
}
Expand Down Expand Up @@ -123,7 +123,9 @@ export class AccountResolver {
throw new Error(
`Failed to create membership through faucet for account address: ${
params.address
}, error: ${error.response?.data?.error || error.cause || error.code}`
}, error: ${
error.response?.data?.error || error.cause || error.code
}, faucet address: ${url}`
)
}
throw error
Expand Down
3 changes: 1 addition & 2 deletions src/server-extension/resolvers/AccountResolver/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { IsUrl } from 'class-validator'
import { ArgsType, Field, ObjectType } from 'type-graphql'
import { BlockchainAccount } from '../../../model'
import { AccountNotificationPreferencesOutput } from '../NotificationResolver/types'

@ObjectType()
Expand All @@ -21,7 +20,7 @@ export class AccountData {
email!: string

@Field(() => String, { nullable: false })
joystreamAccount!: BlockchainAccount
joystreamAccountId!: string

@Field(() => [FollowedChannel], { nullable: false })
followedChannels: FollowedChannel[]
Expand Down

0 comments on commit d872193

Please sign in to comment.