Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public async reportRedemptionCode(code: CheckCodeDTO, me: User): Promise<ShowMessageDTO> {
  2. const findCode = await this.redemptionCodeRepo.findOne({
  3. where: {
  4. redemptionCode: code.redemptionCode,
  5. },
  6. });
  7.  
  8. findCode.reportedCode = true;
  9. findCode.reportedBy = me.username;
  10.  
  11. await this.redemptionCodeRepo.save(findCode);
  12. return { message: 'success' };
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement