-
-
Save AlexDaSoul/1981c4bdf9ecee977335e2dbde65bff3 to your computer and use it in GitHub Desktop.
nga-9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { api as userEnum } from '@grpc-proto/user/user.enum'; | |
... | |
@GrpcMethod('UserService', 'CreateUser') | |
@UseFilters(RpcExceptionFilter.for('UserController::createUser')) | |
public createUser(data: CreateUserReqDTO): Observable<userApi.user.UserRes> { | |
return this.userService.createUser(data).pipe( | |
map(() => { | |
return { | |
status: userEnum.user.EStatus.SUCCESS, | |
message: `User created successfully`, | |
}; | |
}), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment