-
Notifications
You must be signed in to change notification settings - Fork 30
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
Create GET /subscription_user endpoint #429
Comments
@eleanorreem Can I please take on this issue? thanks. |
Thank you @Tim-Quattrochi you have been assigned this issue! Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you! |
@eleanorreem Just wanted to get some clarification. You said the the service should just return the name, and the controller should return the 'GetSubscriptionUsersDto', this is my return response right now: |
Hi @Tim-Quattrochi thank you for your contribution! Great question. Eleanor is off right now until Monday, I will ping her to come here and answer your question. Thanks for your patience! |
* refactor: add GetSubscriptionUserDto and getUserSubscriptions endpoint [WIP][Refactor][Tests] * refactor: remove userId property from GetSubscriptionUserDto, fixed overly nested response. * test: add getUserSubscriptions service tests * refactor: add try catch to getSubscriptions service. * chore: abstract serialization into utils * Remove GetSubscriptionUsersDto * Update get-subscription-user.dto.ts --------- Co-authored-by: eleanorreem <eleanor.reem@hotmail.co.uk>
Overview
We want to start breaking up the GET /user/me request and only fetch information on the pages it is needed. This is starting with subscriptions. We also are misusing types across the site so we want to improve the ways of transferring data. Note that we don't want any DTOs to be used in the service, only in the controllers. We are also phasing out all ITypes such as ISubscriptionUser. All formatting needs to happen in the controller. I have labelled this ticket as advanced, not because of the complexity, but because of the confidence needed in controller/service interactions and appropriate types.
Action Items
SubscriptionUserService.getSubscriptions(userId)
{
id: string;
subscriptionId: string;
subscriptionName: string;
subscriptionInfo: string;
createdAt: Date;
cancelledAt: Date | null;
}
The text was updated successfully, but these errors were encountered: