From 6b59b9988c56907ae1a1f86cdd754c8370f8dabe Mon Sep 17 00:00:00 2001 From: Mir Arif Hasan Date: Thu, 22 Dec 2022 22:25:16 +0600 Subject: [PATCH] docs: developer guide text updated --- packages/hoppscotch-backend/src/user/user.model.ts | 12 ++++++------ packages/hoppscotch-backend/src/user/user.service.ts | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/hoppscotch-backend/src/user/user.model.ts b/packages/hoppscotch-backend/src/user/user.model.ts index e2f2eb4a4..6db48b3e1 100644 --- a/packages/hoppscotch-backend/src/user/user.model.ts +++ b/packages/hoppscotch-backend/src/user/user.model.ts @@ -3,37 +3,37 @@ import { ObjectType, ID, Field } from '@nestjs/graphql'; @ObjectType() export class User { @Field(() => ID, { - description: 'Firebase UID of the user', + description: 'UID of the user', }) uid: string; @Field({ nullable: true, - description: 'Displayed name of the user (if given)', + description: 'Displayed name of the user', }) displayName?: string; @Field({ nullable: true, - description: 'Email of the user (if given)', + description: 'Email of the user', }) email?: string; @Field({ nullable: true, - description: 'URL to the profile photo of the user (if given)', + description: 'URL to the profile photo of the user', }) photoURL?: string; @Field({ nullable: true, - description: 'JSON string of current REST session for logged-in User', + description: 'Stringified current REST session for logged-in User', }) currentRESTSession?: string; @Field({ nullable: true, - description: 'JSON string of current GraphQL session for logged-in User', + description: 'Stringified current GraphQL session for logged-in User', }) currentGQLSession?: string; } diff --git a/packages/hoppscotch-backend/src/user/user.service.ts b/packages/hoppscotch-backend/src/user/user.service.ts index ec62e0778..3b563476f 100644 --- a/packages/hoppscotch-backend/src/user/user.service.ts +++ b/packages/hoppscotch-backend/src/user/user.service.ts @@ -13,6 +13,12 @@ export class UserService { private readonly pubsub: PubSubService, ) {} + /** + * Update a user's information + * @param user User object + * @param updateUserDto Properties to update + * @returns a Either of User or error + */ async updateUser(user: User, updateUserDto: UpdateUserInput) { try { const updatedUser = await this.prisma.user.update({