chore: updated variable names and comments
This commit is contained in:
@@ -19,14 +19,14 @@ export class UpdateUserInput {
|
|||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
name: 'currentRESTSession',
|
name: 'currentRESTSession',
|
||||||
description: 'JSON string of the session',
|
description: 'JSON string of the saved REST session',
|
||||||
})
|
})
|
||||||
currentRESTSession?: string;
|
currentRESTSession?: string;
|
||||||
|
|
||||||
@Field({
|
@Field({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
name: 'currentGQLSession',
|
name: 'currentGQLSession',
|
||||||
description: 'JSON string of the session',
|
description: 'JSON string of the saved GQL session',
|
||||||
})
|
})
|
||||||
currentGQLSession?: string;
|
currentGQLSession?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ export class UserService {
|
|||||||
/**
|
/**
|
||||||
* Update a user's information
|
* Update a user's information
|
||||||
* @param user User object
|
* @param user User object
|
||||||
* @param updateUserDto Properties to update
|
* @param updateUserData Properties to update
|
||||||
* @returns a Either of User or error
|
* @returns a Either of User or error
|
||||||
*/
|
*/
|
||||||
async updateUser(user: User, updateUserDto: UpdateUserInput) {
|
async updateUser(user: User, updateUserData: UpdateUserInput) {
|
||||||
try {
|
try {
|
||||||
const updatedUser = await this.prisma.user.update({
|
const updatedUser = await this.prisma.user.update({
|
||||||
where: { uid: user.uid },
|
where: { uid: user.uid },
|
||||||
data: updateUserDto,
|
data: updateUserData,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Publish subscription for user updates
|
// Publish subscription for user updates
|
||||||
|
|||||||
Reference in New Issue
Block a user