Skip to content

Commit

Permalink
fix: error probelm in user
Browse files Browse the repository at this point in the history
  • Loading branch information
R11manish committed Mar 14, 2024
1 parent e61fd56 commit b76fdb9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class User {
*/
async me() {
try {
return this.sdk.me_query();
return await this.sdk.me_query();
} catch (error) {
throw new Error(errorHandler(error));
}
Expand All @@ -55,7 +55,7 @@ export class User {
}) {
try {
isStringValid(value);
return this.sdk.user_query({ input: { type, value } });
return await this.sdk.user_query({ input: { type, value } });
} catch (error) {
throw new Error(errorHandler(error));
}
Expand Down Expand Up @@ -85,7 +85,7 @@ export class User {
*/
async myPDAs(variables?: myPDAs_queryQueryVariables) {
try {
return this.sdk.myPDAs_query(variables);
return await this.sdk.myPDAs_query(variables);
} catch (error) {
throw new Error(errorHandler(error));
}
Expand Down Expand Up @@ -201,7 +201,7 @@ export class User {
async updateUser(updatedUser: UpdateUserInput) {
try {
validateObjectProperties(updatedUser);
return this.sdk.updateUser_mutation({ input: updatedUser });
return await this.sdk.updateUser_mutation({ input: updatedUser });
} catch (error) {
throw new Error(errorHandler(error));
}
Expand All @@ -218,7 +218,7 @@ export class User {
async updateMyDisplayName(displayName: string) {
try {
isStringValid(displayName);
return this.sdk.updateMyDisplayName_mutation({ displayName });
return await this.sdk.updateMyDisplayName_mutation({ displayName });
} catch (error) {
throw new Error(errorHandler(error));
}
Expand All @@ -235,7 +235,7 @@ export class User {
async updateMyGatewayId(gatewayId: string) {
try {
isStringValid(gatewayId);
return this.sdk.updateMyGatewayId_mutation({ gatewayId });
return await this.sdk.updateMyGatewayId_mutation({ gatewayId });
} catch (error) {
throw new Error(errorHandler(error));
}
Expand All @@ -250,7 +250,7 @@ export class User {
async updateMyProfilePicture(profilePictureUrl: string) {
try {
isValidUrl(profilePictureUrl);
return this.sdk.updateMyProfilePicture_mutation({
return await this.sdk.updateMyProfilePicture_mutation({
profilePictureUrl,
});
} catch (error) {
Expand Down

0 comments on commit b76fdb9

Please sign in to comment.