You are on page 1of 1

91 TECHNOLOGIES PRIVATE LIMITED

1190-80/1, 26th Main Road, 9th Block


Jayanagar, Bengaluru - 560069
CIN:U74999KA2019PTC122507

Web Developer Assessment Task

Task Overview
To Create a Module, which rewards Users Referrer whenever a payment has been
made

● Create a users Model ( User)


○ Name: string,
○ Email: String
○ ReferredUser: User ( current model)
○ isPaymentMade: Boolean
○ TotalEarnings: Number

Create an API, which


● Accepts a userId as Request body
● Sets isPaymentMade to true
● Finds ReferredUser and increments 10 (rupees) to TotalEarnings

Eg
User A User B
Name: A, Name: B
email@gmail.com email: email2@gmail.com
ReferredUser: B ReferredUser: null
isPaymentMade: false isPaymentMade: true
totalEarnings: 0 TotalEarnings: 20

On calling your “API” with userId(mongoDB id ofA) ,


A users - isPaymentMade will become true
B users - totalEarnings will become 30

Deadline: 11th March, 2022, 10PM

Wishing you all the best !


Note: Please message us in internshala chat box, if you have any queries

You might also like