public bool HasVip(string username) { try { var userHasVip = _checkUserHasVipsQuery.CheckUserHasVips(username, 1); return(userHasVip); } catch (Exception e) { _logger.LogError(e, $"Error when checking if User has a Vip token. username: {username}"); return(false); } }
public bool GiftVip(string donorUsername, string receivingUsername, int vipsToGift) { if (!_checkUserHasVipsQuery.CheckUserHasVips(donorUsername, vipsToGift)) { return(false); } _giftVipRepository.GiftVip(donorUsername, receivingUsername, vipsToGift); return(true); }