-
Notifications
You must be signed in to change notification settings - Fork 4
[PB-4945]: feat/command to sync users with tiers in drive #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…-to-sync-users-and-ther-drive-tiers
| $project: { | ||
| _id: 0, | ||
| userUuid: '$user.uuid', | ||
| foreignTierId: '$tier.foreignTierId', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this working if foreignTierId is inside tier.drive field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. It should be tier.featuresPerService.drive.foreignTierId. Nice catch! 🚀
sg-gs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Coverage is on the floor, we need that check to pass first
Okay, I will add coverage to the script |
sg-gs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. WDYT @apsantiso about the ref on Workspaces from the payment's user, is it correct? I would not like to re-run this again to undo things haha
| return { total: userIdsAndForeignTierId.length, failed: errors.length, errors }; | ||
| } | ||
|
|
||
| export async function updatePersonalUsers(usersTiersRepository: UsersTiersRepository, storageService: StorageService) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let call it "Individual" instead of Personal, to keep the business jargon in order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it.
Update:
The function name has been updated.
|
|
It will be automatically closed in 7 days if no further updates are made. |


This PR implements a new command in the CLI folder to be able to sync the user with their tier in Drive.
By passing the business parameter, it will be sync the business subscriptions. By default it syncs the Individual ones (subscription/lifetime).
X_INTERNXT_PAYMENTS_HEADER