storj/satellite/console/consoleweb/consoleql
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
..
testdata V3-1095 Update service to send invitations in project (#1412) 2019-03-06 17:42:19 +02:00
apikey.go v3-2156: Add partner_id on user creation (#2571) 2019-07-17 16:53:14 -04:00
mail.go ResetPassword Table and all CRUD methods. (#1916) 2019-05-13 18:53:52 +03:00
mutation_test.go satellite/console: referral link for individual users (#2614) 2019-07-23 12:08:07 -04:00
mutation.go satellite/satellitedb: add updateEarnedCredits method for user_credits table (#2609) 2019-07-30 09:21:00 -04:00
project.go Project Payment methods (#2037) 2019-07-10 23:29:26 +03:00
projectmember.go Console usage rollup api (#1664) 2019-04-04 17:56:20 +03:00
query_test.go satellite/console: referral link for individual users (#2614) 2019-07-23 12:08:07 -04:00
query.go satellite/console: add get current reward offer to console (#2341) 2019-07-02 10:36:54 -04:00
reward.go satellite/console: add referral link logic (#2576) 2019-07-19 14:22:10 -04:00
schema.go Console usage rollup api (#1664) 2019-04-04 17:56:20 +03:00
token.go Console usage rollup api (#1664) 2019-04-04 17:56:20 +03:00
typecreator.go Project Payment methods (#2037) 2019-07-10 23:29:26 +03:00
user.go v3-2156: Add partner_id on user creation (#2571) 2019-07-17 16:53:14 -04:00
usercredit.go Create graphql query for getting user credit usage (#2255) 2019-06-20 09:09:50 -04:00
utils.go Add console to satellite peer (#1120) 2019-01-24 18:26:36 +02:00