storj/satellite/satellitedb
Yingrong Zhao efa2c776b7
satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609)
* parent 13dd501042
author Yingrong Zhao <yingrong.zhao@gmail.com> 1563560530 -0400
committer Yingrong Zhao <yingrong.zhao@gmail.com> 1563581673 -0400

parent 13dd501042
author Yingrong Zhao <yingrong.zhao@gmail.com> 1563560530 -0400
committer Yingrong Zhao <yingrong.zhao@gmail.com> 1563581428 -0400

satellite/console: add referral link logic (#2576)

* setup referral route

* referredBy

* add user id

* modify user query

* separate optional field from userInfo

* get current reward on init of satellite gui

* remove unsed code

* fix format

* only apply 0 credit on registration

* only pass required information for rewards

* fix time parsing

* fix test and linter

* rename method

* add todo

* remove user referral logic

* add null check and fix format

* get current offer

* remove partnerID on CreateUser struct

* fix storj-sim user creation

* only redeem credit when there's an offer

* fix default offer configuration

* fix migration

* Add helper function for get correct credit duration

* add comment

* only store userid into user_credit table

* add check for partner id to set correct offer type

* change free credit to use invitee credits

* remove unecessary code

* add credit update in activateAccount

* remove unused code

* fix format

* close reader and fix front-end build

* move create credit logic into CreateUser method

* when there's no offer set, user flow shouldn't be interrupted by referral program

* add appropriate error messages

* remove unused code

* add comment

* add error class for no current offer error

* add error class for credits update

* add comment for migration

* only log secret when it's in debug level

* fix typo

* add testdata
2019-07-30 09:21:00 -04:00
..
dbx satellite/marketingweb: Add Partner Offer Type (#2540) 2019-07-25 18:06:23 -04:00
pbold Change protobuf expirations to use time.Time (#2509) 2019-07-09 17:54:00 -04:00
satellitedbtest Optimize KnownUnreliableOrOffline SQL query (#1968) 2019-05-19 17:10:46 +02:00
testdata satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
apikeys.go v3-2156: Add partner_id on user creation (#2571) 2019-07-17 16:53:14 -04:00
attribution_test.go value attribution merge fix and more test cases (#2588) 2019-07-19 11:17:34 -04:00
attribution.go Add attribution report to the satellite CLI (#2288) 2019-06-25 16:58:38 -04:00
buckets.go value attribution merge fix and more test cases (#2588) 2019-07-19 11:17:34 -04:00
bucketusage.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
certdb.go satellite: add monkit task to missing places (#2108) 2019-06-04 13:55:37 +02:00
consoledb_test.go Console postgres tests (#1188) 2019-01-31 15:01:13 +02:00
consoledb.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
containment.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
database.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
irreparabledb.go update irreparableDB.GetLimited query to use where instead of offset (#2585) 2019-07-18 09:21:21 -07:00
locked.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
lockedtx.go ConsoleDB merge and buckets table creation (#1066) 2019-01-16 15:23:28 -05:00
migrate_postgres_test.go Enable Scopelint Linter (#2049) 2019-05-29 09:30:16 -04:00
migrate.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
offers.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
orders.go fix ordersDB methods to take correct args (#2314) 2019-06-25 08:58:42 -07:00
overlaycache.go Improve Node Selection Query (#2648) 2019-07-29 14:32:43 +02:00
projectaccounting.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
projectinvoicestamps.go Console add payments to service (#2100) 2019-06-06 19:07:14 +03:00
projectmembers_test.go V3-1307 combine first and last name to full name (#1569) 2019-03-27 14:33:32 +02:00
projectmembers.go satellite: add monkit task to missing places (#2108) 2019-06-04 13:55:37 +02:00
projectpaymentinfos.go Project Payment methods (#2037) 2019-07-10 23:29:26 +03:00
projects_test.go satellite: add monkit task to missing places (#2108) 2019-06-04 13:55:37 +02:00
projects.go value attribution merge fix and more test cases (#2588) 2019-07-19 11:17:34 -04:00
regtokens.go satellite: add monkit task to missing places (#2108) 2019-06-04 13:55:37 +02:00
repairqueue_test.go Add test to ensure correct order of repair queue selection (#2551) 2019-07-22 10:10:42 -04:00
repairqueue.go add missing error handling (#2630) 2019-07-25 17:01:44 +02:00
resetpasstokens.go satellite: add monkit task to missing places (#2108) 2019-06-04 13:55:37 +02:00
storagenodeaccounting.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
usagerollups.go Fix the way project_id is stored in bucket_storage_tallies and bucket_bandwidth_rollups (#2283) 2019-06-21 11:38:37 -04:00
usercredits_test.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
usercredits.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
userpayments.go Console add payments to service (#2100) 2019-06-06 19:07:14 +03:00
users_test.go Use mail.test as domain in emails (#2224) 2019-06-18 02:28:40 +02:00
users.go v3-2156: Add partner_id on user creation (#2571) 2019-07-17 16:53:14 -04:00
utils_test.go internal/testrand: new package for random data (#2282) 2019-06-26 13:38:51 +03:00
utils.go fix ordersDB methods to take correct args (#2314) 2019-06-25 08:58:42 -07:00