storj/satellite/console
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
..
consoleauth internal/testrand: new package for random data (#2282) 2019-06-26 13:38:51 +03:00
consoleweb satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
apikeys_test.go server side macaroons (#1945) 2019-05-24 10:51:27 -06:00
apikeys.go Add Attribution Columns to appropriate tables for OSPP referral link (#2516) 2019-07-12 13:59:19 -04:00
auth.go V3-1399 Error messages (#1715) 2019-04-10 03:15:12 +03:00
database.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
projectinvoicestamps_test.go internal/testrand: new package for random data (#2282) 2019-06-26 13:38:51 +03:00
projectinvoicestamps.go Console add payments to service (#2100) 2019-06-06 19:07:14 +03:00
projectmembers_test.go satellite/console: nicer error handling in tests (#2378) 2019-06-28 16:04:50 +03:00
projectmembers.go V3-1307 combine first and last name to full name (#1569) 2019-03-27 14:33:32 +02:00
projectpayments_test.go Project Payment methods (#2037) 2019-07-10 23:29:26 +03:00
projectpayments.go Project Payment methods (#2037) 2019-07-10 23:29:26 +03:00
projects_test.go Use mail.test as domain in emails (#2224) 2019-06-18 02:28:40 +02:00
projects.go Add Attribution Columns to appropriate tables for OSPP referral link (#2516) 2019-07-12 13:59:19 -04:00
registrationtoken.go satellite: add monkit task to missing places (#2108) 2019-06-04 13:55:37 +02:00
resetpasswordtoken_test.go Use mail.test as domain in emails (#2224) 2019-06-18 02:28:40 +02:00
resetpasswordtoken.go ResetPassword Table and all CRUD methods. (#1916) 2019-05-13 18:53:52 +03:00
service.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
usagerollups_test.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
usagerollups.go Fix storage and object_count calculations on console (#2081) 2019-06-03 15:54:06 +03:00
usercredits.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
userpayments_test.go internal/testrand: new package for random data (#2282) 2019-06-26 13:38:51 +03:00
userpayments.go Console add payments to service (#2100) 2019-06-06 19:07:14 +03:00
users_test.go v3-2156: Add partner_id on user creation (#2571) 2019-07-17 16:53:14 -04:00
users.go v3-2156: Add partner_id on user creation (#2571) 2019-07-17 16:53:14 -04:00
validation.go V3-1399 Error messages (#1715) 2019-04-10 03:15:12 +03:00