mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-19 03:01:10 +10:00
move environment module to integrations
This commit is contained in:
@ -30,12 +30,6 @@ export class UserController {
|
||||
return user;
|
||||
}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@Post('info')
|
||||
async getUserInfo(@AuthUser() user: User) {
|
||||
return await this.userService.getUserInstance(user.id);
|
||||
}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@Post('update')
|
||||
async updateUser(
|
||||
|
||||
@ -15,21 +15,6 @@ export class UserService {
|
||||
return this.userRepository.findById(userId);
|
||||
}
|
||||
|
||||
async getUserInstance(userId: string): Promise<any> {
|
||||
const user: User = await this.userRepository.findOne({
|
||||
relations: ['workspace'],
|
||||
where: {
|
||||
id: userId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
throw new NotFoundException('User not found');
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
async update(userId: string, updateUserDto: UpdateUserDto) {
|
||||
const user = await this.userRepository.findById(userId);
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user