|
|
@@ -41,9 +41,10 @@ export class ApiUserController {
|
|
|
@Get('/get/:id')
|
|
|
public async get(@Param('id') id: string, @Req() req) {
|
|
|
const chatRole = await this.apiUserService.findById(Number(id))
|
|
|
- // if (!req.user || req.user.apiUserId != chatRole.id) {
|
|
|
- // chatRole.code = ''
|
|
|
- // }
|
|
|
+ if (!req.user || req.user.id != chatRole.userId) {
|
|
|
+ chatRole.code = ''
|
|
|
+ chatRole.publicCode = ''
|
|
|
+ }
|
|
|
return chatRole
|
|
|
}
|
|
|
|