docs: developer guide text updated
This commit is contained in:
@@ -3,37 +3,37 @@ import { ObjectType, ID, Field } from '@nestjs/graphql';
|
|||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class User {
|
export class User {
|
||||||
@Field(() => ID, {
|
@Field(() => ID, {
|
||||||
description: 'Firebase UID of the user',
|
description: 'UID of the user',
|
||||||
})
|
})
|
||||||
uid: string;
|
uid: string;
|
||||||
|
|
||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: 'Displayed name of the user (if given)',
|
description: 'Displayed name of the user',
|
||||||
})
|
})
|
||||||
displayName?: string;
|
displayName?: string;
|
||||||
|
|
||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: 'Email of the user (if given)',
|
description: 'Email of the user',
|
||||||
})
|
})
|
||||||
email?: string;
|
email?: string;
|
||||||
|
|
||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: 'URL to the profile photo of the user (if given)',
|
description: 'URL to the profile photo of the user',
|
||||||
})
|
})
|
||||||
photoURL?: string;
|
photoURL?: string;
|
||||||
|
|
||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: 'JSON string of current REST session for logged-in User',
|
description: 'Stringified current REST session for logged-in User',
|
||||||
})
|
})
|
||||||
currentRESTSession?: string;
|
currentRESTSession?: string;
|
||||||
|
|
||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: 'JSON string of current GraphQL session for logged-in User',
|
description: 'Stringified current GraphQL session for logged-in User',
|
||||||
})
|
})
|
||||||
currentGQLSession?: string;
|
currentGQLSession?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export class UserService {
|
|||||||
private readonly pubsub: PubSubService,
|
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) {
|
async updateUser(user: User, updateUserDto: UpdateUserInput) {
|
||||||
try {
|
try {
|
||||||
const updatedUser = await this.prisma.user.update({
|
const updatedUser = await this.prisma.user.update({
|
||||||
|
|||||||
Reference in New Issue
Block a user