Skip to content

Commit

Permalink
disabled referral history & get contact referrals; temporarily remove…
Browse files Browse the repository at this point in the history
…d linting
  • Loading branch information
ice-ares committed Mar 25, 2023
1 parent cc2bda7 commit dad53ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ steps.findLatestGoVersion.outputs.latestGoVersion }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Slack Notification For Failure/Cancellation
if: ${{ github.event_name == 'push' && (failure() || cancelled()) }}
uses: rtCamp/action-slack-notify@v2
Expand Down
16 changes: 16 additions & 0 deletions users/users_referrals.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (r *repository) GetReferrals(ctx context.Context, userID string, referralTy
AND referrals.username != referrals.id
AND referrals.referred_by != referrals.id`
case ContactsReferrals:
if true {
return &Referrals{
Referrals: make([]*MinimalUserProfile, 0, 0),
}, nil
}
referralTypeJoin = `
JOIN USERS referrals
ON NULLIF(referrals.phone_number_hash,'') IS NOT NULL
Expand Down Expand Up @@ -177,7 +182,18 @@ func (r *repository) GetReferralAcquisitionHistory(ctx context.Context, userID s
nowNanos := now.UnixNano()
nsSinceMidnight := NanosSinceMidnight(now)
pastNanos := stdlibtime.Unix(0, nowNanos).UTC().Add(-days * 24 * stdlibtime.Hour).Add(-nsSinceMidnight).UnixNano()
if true {
result := make([]*ReferralAcquisition, 0, daysNumber)
for i := 0; i < int(daysNumber); i++ {
result = append(result, &ReferralAcquisition{
Date: time.New(now.Add(-stdlibtime.Duration(i) * 24 * stdlibtime.Hour)),
T1: 0,
T2: 0,
})
}

return result, nil
}
sql := `
SELECT *
FROM (
Expand Down

0 comments on commit dad53ec

Please sign in to comment.