Real-Dev-Squad / website-backend

The backend code for all our website-related apps
https://api.realdevsquad.com/
MIT License
55 stars 258 forks source link

Added AWS config and identity store #2208

Closed vikhyat187 closed 1 week ago

vikhyat187 commented 1 month ago

Date: 8th Oct 24

Developer Name: Vikhyat


Issue Ticket Number

https://github.com/Real-Dev-Squad/todo-action-items/issues/253

Description

Have added the AWS config setup and functions to create user / add user to the IAM group

Documentation Updated?

Under Feature Flag

Database Changes

Breaking Changes

Development Tested?

Screenshots

Screenshot 1

Test Coverage

Screenshot 1
----------------------------------------|---------|----------|---------|---------|-------------------------------------------------------------------------
File                                    | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                       
----------------------------------------|---------|----------|---------|---------|-------------------------------------------------------------------------
All files                               |   72.23 |    61.04 |   72.82 |   72.22 |                                                                         
 website-backend                        |   70.21 |    11.11 |      75 |   70.21 |                                                                         
  .eslintrc.js                          |       0 |      100 |     100 |       0 | 4                                                                       
  .mocharc.js                           |     100 |      100 |     100 |     100 |                                                                         
  app.js                                |   93.75 |       50 |     100 |   93.75 | 28                                                                      
  newrelic.js                           |     100 |      100 |     100 |     100 |                                                                         
  nyc.config.js                         |       0 |      100 |     100 |       0 | 5                                                                       
  server.js                             |   59.25 |        0 |      50 |   59.25 | 46-67                                                                   
 website-backend/config                 |       0 |      100 |     100 |       0 |                                                                         
  custom-environment-variables.js       |       0 |      100 |     100 |       0 | 8                                                                       
  default.js                            |       0 |      100 |     100 |       0 | 9-10                                                                    
  development.js                        |       0 |      100 |     100 |       0 | 6-9                                                                     
  local.js                              |       0 |      100 |     100 |       0 | 1                                                                       
  production.js                         |       0 |      100 |     100 |       0 | 5                                                                       
  staging.js                            |       0 |      100 |     100 |       0 | 5                                                                       
 website-backend/constants              |   97.77 |      100 |       0 |   97.77 |                                                                         
  answers.ts                            |     100 |      100 |     100 |     100 |                                                                         
  application.ts                        |     100 |      100 |     100 |     100 |                                                                         
  authorities.ts                        |     100 |      100 |     100 |     100 |                                                                         
  badges.ts                             |     100 |      100 |     100 |     100 |                                                                         
  bot.ts                                |     100 |      100 |     100 |     100 |                                                                         
  cacheKeys.ts                          |     100 |      100 |     100 |     100 |                                                                         
  cloudflareCache.ts                    |     100 |      100 |     100 |     100 |                                                                         
  cloudinary.ts                         |     100 |      100 |     100 |     100 |                                                                         
  constants.ts                          |     100 |      100 |     100 |     100 |                                                                         
  errorMessages.ts                      |      50 |      100 |       0 |      50 | 10                                                                      
  events.ts                             |     100 |      100 |     100 |     100 |                                                                         
  extensionRequests.ts                  |     100 |      100 |     100 |     100 |                                                                         
  external-accounts.ts                  |     100 |      100 |     100 |     100 |                                                                         
  firebase.ts                           |     100 |      100 |     100 |     100 |                                                                         
  imageVerificationTypes.ts             |     100 |      100 |     100 |     100 |                                                                         
  items.ts                              |     100 |      100 |     100 |     100 |                                                                         
  logs.ts                               |     100 |      100 |     100 |     100 |                                                                         
  monitor.ts                            |     100 |      100 |     100 |     100 |                                                                         
  multer.ts                             |     100 |      100 |     100 |     100 |                                                                         
  profileDiff.ts                        |     100 |      100 |     100 |     100 |                                                                         
  progresses.ts                         |     100 |      100 |     100 |     100 |                                                                         
  rateLimiting.ts                       |       0 |      100 |     100 |       0 | 1-6                                                                     
  requests.ts                           |     100 |      100 |     100 |     100 |                                                                         
  roles.ts                              |     100 |      100 |     100 |     100 |                                                                         
  subscription-validator.ts             |     100 |      100 |     100 |     100 |                                                                         
  tags.ts                               |     100 |      100 |     100 |     100 |                                                                         
  taskRequests.ts                       |     100 |      100 |     100 |     100 |                                                                         
  tasks.ts                              |     100 |      100 |     100 |     100 |                                                                         
  urls.ts                               |     100 |      100 |     100 |     100 |                                                                         
  userDataLevels.ts                     |     100 |      100 |     100 |     100 |                                                                         
  userStatus.ts                         |     100 |      100 |     100 |     100 |                                                                         
  users.ts                              |     100 |      100 |     100 |     100 |                                                                         
  wallets.ts                            |     100 |      100 |     100 |     100 |                                                                         
 website-backend/controllers            |    72.5 |    65.69 |   74.59 |   72.12 |                                                                         
  answers.ts                            |    62.5 |    18.75 |   45.45 |   63.46 | 22-23,35-38,74-99                                                       
  applications.ts                       |   88.23 |      100 |     100 |    87.5 | 61-62,98-99,128-129,147-148                                             
  arts.js                               |    60.6 |       50 |      75 |   58.62 | 19-20,38-39,58-59,64-73                                                 
  auction.js                            |   80.76 |    85.71 |     100 |   81.39 | 19-20,39-40,62-63,87-88                                                 
  auth.js                               |      80 |    73.52 |   84.61 |   79.61 | 54-55,112-114,119-120,169-170,193-194,210-211,216-228                   
  awsAccess.ts                          |    92.3 |       90 |     100 |   91.66 | 41-42                                                                   
  badges.js                             |   64.28 |     5.55 |   83.33 |   63.41 | 22-40,63-64,81,88-89,107-108                                            
  challenge.js                          |   18.91 |        0 |       0 |   21.87 | 11-21,32-43,52-54,68-81                                                 
  cloudflareCache.js                    |   74.07 |     62.5 |     100 |   72.54 | 30,38-43,52-59,64-65,88-90,102-103                                      
  contributions.js                      |   86.66 |      100 |     100 |   85.71 | 20-21                                                                   
  discordactions.js                     |   72.12 |    62.16 |   82.85 |   71.01 | ...,292,295,297,309-311,320-321,350,386-387,405-406,411-450,466,474-475 
  events.js                             |   82.01 |    71.05 |   86.36 |    81.1 | 77,102-116,124,155-156,180,213-214,241-242,260-274,312-313              
  extensionRequests.js                  |    83.7 |    55.45 |     100 |   82.94 | 62-66,95-96,121-122,137,174-177,190-194,208,251-252,266,317-318         
  extensionRequestsv2.ts                |   86.15 |       74 |     100 |   85.24 | 26,45,55,78,100-101,111,144-145                                         
  external-accounts.js                  |   91.33 |    80.95 |     100 |   90.67 | 28-29,47-48,57,62,86-87,117-123,174                                     
  fcmToken.js                           |   92.85 |       50 |     100 |   91.66 | 22                                                                      
  goals.js                              |   86.66 |       50 |     100 |   85.71 | 16-18                                                                   
  health.js                             |     100 |      100 |     100 |     100 |                                                                         
  invites.ts                            |   22.22 |        0 |       0 |   18.75 | 9-54,59-76                                                              
  issues.js                             |   52.45 |     37.5 |    62.5 |   51.78 | 29,37-38,49-50,60-108                                                   
  items.js                              |   23.07 |        0 |       0 |   26.08 | 12-20,32-41,53-64                                                       
  levels.js                             |      28 |      100 |       0 |   31.81 | 13-28,40-47,58-66                                                       
  logs.js                               |   79.41 |       75 |     100 |   78.12 | 20-21,30,54-60,70-71                                                    
  members.js                            |   89.47 |    82.35 |     100 |   88.23 | 22-23,46-47,71-72                                                       
  monitor.js                            |   91.42 |       70 |     100 |   90.62 | 63,121,178                                                              
  notify.js                             |    12.5 |        0 |       0 |   13.15 | 12-78                                                                   
  oooRequests.ts                        |    87.5 |    71.87 |     100 |   86.36 | 27,59-60,69,119-120                                                     
  profileDiffs.js                       |     100 |      100 |     100 |     100 |                                                                         
  progresses.js                         |   78.26 |       40 |     100 |   76.19 | 63-69,123-124,177-178,231-232                                           
  pullRequests.js                       |   18.42 |        0 |       0 |      20 | 13-29,41-59,71-89                                                       
  questions.ts                          |   53.12 |      100 |    37.5 |   57.14 | 37-59                                                                   
  recruiters.js                         |   78.94 |      100 |     100 |   76.47 | 22-23,41-42                                                             
  requests.ts                           |   79.16 |    70.58 |     100 |   76.74 | 42,56,60-61,71-77,80-86,96-97                                           
  staging.js                            |   13.79 |        0 |       0 |   14.81 | 4-27,34-80                                                              
  stocks.js                             |      24 |        0 |       0 |   27.27 | 11-20,30-38,48-57                                                       
  subscription.ts                       |   80.48 |       50 |     100 |   77.14 | 16,21-22,31,41-42,61-69                                                 
  tags.js                               |   22.85 |        0 |       0 |    25.8 | 13-32,44-52,63-71,76-85                                                 
  taskRequestsv2.ts                     |   42.18 |       25 |     100 |   40.32 | 17,21,27,32-40,51,56-172                                                
  tasks.js                              |    84.1 |    81.25 |   93.54 |   83.75 | ...,232-235,244,251,294-295,388,411-412,435-436,441-458,483-484,510,516 
  tasksRequests.js                      |   88.46 |    91.42 |     100 |    87.9 | 14,22-23,42-43,64,80,99,125-126,160-161,185,223-224                     
  trading.js                            |   28.57 |        0 |       0 |   30.76 | 10-26                                                                   
  userStatus.js                         |   86.77 |    73.52 |     100 |   85.18 | 26-27,31-32,55-56,60-63,96-97,126-129,147-148                           
  users.js                              |   72.35 |    73.68 |   74.02 |   72.39 | ...822,846,875-876,881-882,890,930-931,962-963,1002,1005,1009,1027-1028 
  wallets.js                            |   81.25 |    33.33 |     100 |   79.31 | 22-23,43-44,65-66                                                       
 website-backend/middlewares            |   72.84 |    67.27 |   83.72 |   72.08 |                                                                         
  assignTask.js                         |   35.71 |        0 |       0 |   38.46 | 6-16                                                                    
  authenticate.js                       |   67.74 |    76.92 |     100 |   65.51 | 65-85                                                                   
  authenticateProfile.js                |     100 |      100 |     100 |     100 |                                                                         
  authinticateServiceRequest.ts         |   17.64 |        0 |       0 |   18.75 | 7-23                                                                    
  authorization.js                      |     100 |       60 |     100 |     100 | 23-40                                                                   
  authorizeBot.js                       |   86.95 |    66.66 |     100 |   85.71 | 9,14,24                                                                 
  authorizeOwnOrSuperUser.ts            |   81.81 |      100 |     100 |      80 | 24-25                                                                   
  authorizeOwner.js                     |       0 |        0 |       0 |       0 | 1-30                                                                    
  authorizeRoles.js                     |     100 |      100 |     100 |     100 |                                                                         
  authorizeUsersAndService.ts           |     100 |      100 |     100 |     100 |                                                                         
  checkCanGenerateDiscordLink.ts        |   86.36 |    84.61 |     100 |      85 | 11,31-33                                                                
  contentTypeCheck.js                   |   85.71 |    83.33 |     100 |   85.71 | 14                                                                      
  devFlag.ts                            |   66.66 |       50 |     100 |    62.5 | 8,12-13                                                                 
  index.js                              |     100 |      100 |     100 |     100 |                                                                         
  passport.js                           |   66.66 |      100 |       0 |   66.66 | 13-18                                                                   
  rateLimiting.js                       |       0 |        0 |       0 |       0 | 1-50                                                                    
  responseHeaders.js                    |      90 |      100 |     100 |      90 | 31                                                                      
  taskRequests.js                       |   83.33 |    83.33 |     100 |   83.33 | 23,30-31                                                                
  verifydiscord.js                      |     100 |      100 |     100 |     100 |                                                                         
 website-backend/middlewares/validators |   77.74 |    58.75 |   77.89 |   77.73 |                                                                         
  answers.ts                            |   77.77 |      100 |     100 |      75 | 17-18,31-32                                                             
  application.ts                        |   88.57 |      100 |     100 |    87.5 | 43-44,88-89                                                             
  arts.js                               |      80 |      100 |     100 |   77.77 | 16-17                                                                   
  auctions.js                           |   77.77 |      100 |     100 |      75 | 14-15,27-28                                                             
  badges.js                             |     100 |    88.46 |     100 |     100 | 31-55                                                                   
  challenges.js                         |      30 |      100 |       0 |   33.33 | 4-16                                                                    
  discordactions.js                     |   57.69 |      100 |   66.66 |   56.52 | 5-15,28-29,38-39                                                        
  events.js                             |    70.1 |      100 |   85.71 |    68.6 | 15-16,31-32,48-49,68-69,83-84,99-100,105-123,143-144,164-165,182-183    
  extensionRequests.js                  |   90.69 |      100 |     100 |   89.74 | 26-27,104-105                                                           
  extensionRequestsv2.ts                |     100 |      100 |     100 |     100 |                                                                         
  external-accounts.js                  |   83.33 |      100 |   85.71 |   84.61 | 44-45,62-63                                                             
  fcmToken.js                           |     100 |      100 |     100 |     100 |                                                                         
  invites.ts                            |      25 |      100 |       0 |   22.22 | 7-27                                                                    
  items.js                              |   22.72 |        0 |       0 |   26.31 | 6-28,33-48                                                              
  levels.js                             |      30 |      100 |       0 |   33.33 | 4-14                                                                    
  members.js                            |     100 |      100 |     100 |     100 |                                                                         
  monitor.js                            |   93.93 |      100 |     100 |   93.33 | 111-112                                                                 
  notify.js                             |   91.66 |      100 |     100 |      90 | 19                                                                      
  oooRequests.ts                        |     100 |      100 |     100 |     100 |                                                                         
  progresses.js                         |     100 |      100 |     100 |     100 |                                                                         
  qrCodeAuth.js                         |    92.3 |      100 |     100 |    91.3 | 45-46                                                                   
  questions.ts                          |      80 |      100 |     100 |   77.77 | 17-18                                                                   
  recruiter.js                          |      80 |      100 |     100 |   77.77 | 19-20                                                                   
  requests.ts                           |     100 |      100 |     100 |     100 |                                                                         
  staging.js                            |   22.22 |      100 |       0 |      25 | 4-16,21-32                                                              
  stocks.js                             |      30 |      100 |       0 |   33.33 | 4-15                                                                    
  subscription.ts                       |    92.3 |       50 |     100 |   91.66 | 20                                                                      
  tags.js                               |   28.57 |        0 |       0 |   30.76 | 5-23                                                                    
  task-requests.js                      |   54.54 |        0 |   33.33 |   54.83 | 45-46,51-101                                                            
  taskRequests.ts                       |     100 |      100 |     100 |     100 |                                                                         
  tasks.js                              |   83.78 |       75 |   70.58 |   83.82 | 166-178,190,202-203,269-274                                             
  trading.js                            |      30 |      100 |       0 |   33.33 | 4-18                                                                    
  user.js                               |   84.37 |     62.5 |   83.33 |   85.39 | 69,204-208,258-259,353-367                                              
  userStatus.js                         |   89.74 |      100 |     100 |   88.88 | 111-112,133-134                                                         
  utils.ts                              |     100 |      100 |     100 |     100 |                                                                         
 website-backend/models                 |   67.07 |    59.79 |   69.72 |   66.86 |                                                                         
  answers.ts                            |   45.65 |       75 |   28.57 |   46.51 | 8-30,35-46,65,70-71                                                     
  applications.ts                       |   78.66 |       75 |     100 |   76.81 | 11,17,33-34,48-49,64,70,91-92,113-114,123-124,132-133                   
  arts.js                               |   80.64 |      100 |     100 |   78.57 | 14-15,36-37,60-61                                                       
  auctions.js                           |   76.53 |       75 |   68.42 |    78.4 | 23,26-27,43-44,59-60,64-65,70-71,102-103,110-111,135-136,182-183        
  badges.js                             |   33.33 |        2 |      25 |   34.54 | 21-82,97-98,114-122                                                     
  chaincodes.js                         |   81.81 |      100 |     100 |      80 | 13-14                                                                   
  challenges.js                         |      25 |        0 |       0 |   27.65 | 23-35,45-58,68-82,93-105                                                
  discordactions.js                     |   78.19 |    65.13 |   88.78 |   78.07 | ...824,854-855,873,878,891-898,913-914,982-983,1018,1033-1034,1045-1049 
  events.js                             |   17.64 |        0 |    8.33 |   18.69 | 26-27,39-44,59-69,87-129,142-150,166-192,204-257,262-269,274-294        
  extensionRequests.js                  |   82.95 |    88.46 |     100 |   81.01 | 17-18,38-39,67-68,97,101-102,130-131,141-142,164-165                    
  external-accounts.js                  |   79.16 |    57.14 |     100 |   77.27 | 9-10,21,36-37                                                           
  fcmToken.js                           |   85.71 |       75 |     100 |      85 | 25-29                                                                   
  items.js                              |   44.44 |      100 |      20 |   45.23 | 36-37,48-59,70-90                                                       
  levels.js                             |   39.28 |      100 |   28.57 |      40 | 16-17,28-32,42-55                                                       
  logs.js                               |   79.38 |    74.62 |   84.21 |   78.51 | ...,106-107,126-128,134-135,155-156,161-162,183,192-193,195-196,248-249 
  members.js                            |   85.71 |    82.75 |     100 |      84 | 38-39,61-62,86-87,109-110                                               
  monitor.js                            |     100 |      100 |     100 |     100 |                                                                         
  profileDiffs.js                       |   80.23 |    63.33 |    92.3 |   80.76 | 18-24,33-34,96,101-102,131-132,148-149,173-174                          
  progresses.js                         |     100 |      100 |     100 |     100 |                                                                         
  qrCodeAuth.js                         |   76.47 |    61.53 |     100 |   74.19 | 34-35,46-47,56-57,73-74                                                 
  questions.ts                          |   29.41 |        0 |       0 |   31.25 | 10-30                                                                   
  recruiters.js                         |   85.71 |      100 |     100 |   84.61 | 42-43,64-65                                                             
  requests.ts                           |    83.5 |    80.48 |     100 |   82.02 | 27-28,51,67-68,106,112-113,115-116,118-119,153-154,183-184              
  stocks.js                             |   15.68 |        0 |       0 |   17.02 | 12-17,27-39,48-71,80-95                                                 
  tags.js                               |   31.91 |       50 |   18.18 |   33.33 | 17-19,25-26,37-42,52-65,70-84                                           
  taskRequests.js                       |   39.86 |    33.33 |   34.09 |   40.45 | ...,158-159,183-186,215-309,354-355,386,446-485,522-559,563-587,590-607 
  tasks.js                              |   77.99 |    76.59 |   86.15 |   77.06 | ...-390,404-408,426-427,432-469,480-500,549-550,581-590,675-676,699-700 
  userFutureStatus.ts                   |   37.93 |        0 |      40 |      32 | 23-24,34-54                                                             
  userStatus.js                         |   81.67 |    80.32 |   97.22 |   80.97 | ...,468,491-492,570,587-588,609-611,641-642,658-659,664,685-686,702-703 
  users.js                              |   63.84 |    60.69 |   65.54 |   63.45 | ...742-743,748-780,797-798,819,842-843,876-877,882-900,905-927,953-1012 
  wallets.js                            |      50 |    28.57 |   66.66 |   48.57 | 18-19,40-41,50-69                                                       
 website-backend/routes                 |   99.81 |       50 |     100 |   99.81 |                                                                         
  answers.ts                            |     100 |      100 |     100 |     100 |                                                                         
  applications.ts                       |     100 |      100 |     100 |     100 |                                                                         
  arts.ts                               |     100 |      100 |     100 |     100 |                                                                         
  auctions.ts                           |     100 |      100 |     100 |     100 |                                                                         
  auth.ts                               |     100 |      100 |     100 |     100 |                                                                         
  awsAccess.ts                          |     100 |      100 |     100 |     100 |                                                                         
  badges.js                             |     100 |      100 |     100 |     100 |                                                                         
  challenges.ts                         |     100 |      100 |     100 |     100 |                                                                         
  cloudflareCache.ts                    |     100 |      100 |     100 |     100 |                                                                         
  contributions.ts                      |     100 |      100 |     100 |     100 |                                                                         
  discordactions.js                     |     100 |      100 |     100 |     100 |                                                                         
  events.js                             |     100 |      100 |     100 |     100 |                                                                         
  extensionRequests.js                  |     100 |      100 |     100 |     100 |                                                                         
  external-accounts.js                  |     100 |      100 |     100 |     100 |                                                                         
  fcmToken.js                           |     100 |      100 |     100 |     100 |                                                                         
  goals.ts                              |     100 |      100 |     100 |     100 |                                                                         
  healthCheck.ts                        |     100 |      100 |     100 |     100 |                                                                         
  index.ts                              |     100 |      100 |     100 |     100 |                                                                         
  invites.ts                            |     100 |      100 |     100 |     100 |                                                                         
  issues.ts                             |     100 |      100 |     100 |     100 |                                                                         
  items.js                              |     100 |      100 |     100 |     100 |                                                                         
  levels.js                             |     100 |      100 |     100 |     100 |                                                                         
  logs.js                               |     100 |      100 |     100 |     100 |                                                                         
  members.js                            |     100 |      100 |     100 |     100 |                                                                         
  monitor.js                            |     100 |      100 |     100 |     100 |                                                                         
  notify.ts                             |     100 |      100 |     100 |     100 |                                                                         
  profileDiffs.js                       |     100 |      100 |     100 |     100 |                                                                         
  progresses.ts                         |     100 |      100 |     100 |     100 |                                                                         
  pullrequests.ts                       |     100 |      100 |     100 |     100 |                                                                         
  questions.ts                          |     100 |      100 |     100 |     100 |                                                                         
  requests.ts                           |     100 |      100 |     100 |     100 |                                                                         
  staging.ts                            |     100 |      100 |     100 |     100 |                                                                         
  stocks.js                             |     100 |      100 |     100 |     100 |                                                                         
  subscription.ts                       |     100 |      100 |     100 |     100 |                                                                         
  tags.js                               |     100 |      100 |     100 |     100 |                                                                         
  taskRequests.js                       |     100 |      100 |     100 |     100 |                                                                         
  tasks.js                              |   96.87 |       50 |     100 |   96.87 | 30                                                                      
  trading.ts                            |     100 |      100 |     100 |     100 |                                                                         
  userStatus.js                         |     100 |      100 |     100 |     100 |                                                                         
  users.js                              |     100 |      100 |     100 |     100 |                                                                         
  wallets.js                            |     100 |      100 |     100 |     100 |                                                                         
 website-backend/scripts                |       0 |        0 |       0 |       0 |                                                                         
  validateSetup.js                      |       0 |        0 |       0 |       0 | 2-44                                                                    
 website-backend/services               |   64.21 |    43.22 |   61.29 |   64.59 |                                                                         
  EventAPIService.js                    |   36.66 |        0 |    12.5 |   36.66 | 21-24,30-37,41-66                                                       
  EventTokenService.js                  |   60.86 |       50 |      60 |   60.86 | 26-33,53-62                                                             
  authService.js                        |    87.5 |      100 |   66.66 |    87.5 | 32                                                                      
  botVerificationService.js             |     100 |      100 |     100 |     100 |                                                                         
  cloudflareService.js                  |      60 |      100 |       0 |      60 | 5-16                                                                    
  contributions.js                      |   98.48 |       75 |     100 |   98.43 | 153                                                                     
  dataAccessLayer.js                    |   90.47 |    90.47 |   95.45 |   89.61 | 27-33,36,111                                                            
  discordMembersService.js              |   81.81 |      100 |     100 |      80 | 25-26                                                                   
  discordService.js                     |   87.27 |      100 |   84.61 |   87.75 | 24-35                                                                   
  getFcmTokenFromUserId.js              |   36.36 |        0 |       0 |    37.5 | 6-11                                                                    
  getUserIdsFromRoleId.js               |      25 |        0 |       0 |   23.07 | 5-17                                                                    
  githubService.js                      |   35.87 |    16.21 |   29.62 |   36.97 | ...-124,136-155,160-180,204-205,210-229,237-259,284-287,297-328,338-353 
  goalService.js                        |   42.85 |      100 |       0 |      50 | 4-14                                                                    
  imageService.js                       |   23.07 |      100 |       0 |      24 | 13-54                                                                   
  index.js                              |     100 |      100 |     100 |     100 |                                                                         
  issuesService.js                      |      70 |      100 |      50 |      75 | 8-9                                                                     
  tasks.js                              |   98.18 |     87.5 |     100 |   98.07 | 45                                                                      
  tradingService.js                     |   20.33 |        0 |       0 |   20.68 | 20,31-132                                                               
  users.js                              |   94.11 |      100 |     100 |   93.75 | 60-61                                                                   
 website-backend/typeDefinitions        |     100 |      100 |     100 |     100 |                                                                         
  rqlParser.ts                          |     100 |      100 |     100 |     100 |                                                                         
 website-backend/utils                  |   73.68 |    59.57 |   78.34 |   73.95 |                                                                         
  RQLParser.ts                          |   74.46 |    72.22 |   83.33 |   77.77 | 28,38-41,64-65,86-87,93                                                 
  application.ts                        |     100 |      100 |     100 |     100 |                                                                         
  array.js                              |   83.33 |    70.58 |     100 |   81.81 | 11,30                                                                   
  awsFunctions.ts                       |   27.27 |        0 |       0 |   23.68 | 25-36,46-71,82-101,111-133                                              
  badges.js                             |      40 |    28.57 |      50 |    42.1 | 10-30,52-53                                                             
  cache.js                              |   88.29 |    74.19 |      95 |   87.77 | 31-32,39-40,68,124-125,185-186,210,227                                  
  cloudinary.js                         |    62.5 |        0 |       0 |   71.42 | 7-8                                                                     
  customWordCountValidator.js           |   83.33 |       50 |     100 |   83.33 | 12                                                                      
  data-access.js                        |       0 |        0 |       0 |       0 | 35-111                                                                  
  discord-actions.js                    |   60.46 |    69.23 |   66.66 |   60.97 | 38-39,44-70                                                             
  events.js                             |     100 |       90 |     100 |     100 | 14                                                                      
  extensionRequests.js                  |   86.66 |    70.83 |     100 |   87.17 | 39,54-59                                                                
  fetch.js                              |   77.77 |       80 |     100 |      75 | 26-27                                                                   
  fetchMultiplePageResults.js           |   66.66 |        0 |     100 |   63.63 | 9-14                                                                    
  firestore.js                          |     100 |      100 |     100 |     100 |                                                                         
  helper.js                             |   83.87 |       55 |     100 |   83.33 | 34,39,44,63,84                                                          
  logger.ts                             |     100 |       50 |     100 |     100 | 35-36                                                                   
  logs.js                               |   75.86 |    55.66 |      75 |   75.43 | 34,52-59,75,92-115                                                      
  monitor.js                            |     100 |      100 |     100 |     100 |                                                                         
  multer.js                             |      68 |     12.5 |   66.66 |      68 | 16,26-33                                                                
  obfuscate.js                          |     100 |      100 |     100 |     100 |                                                                         
  profileDiffs.js                       |   22.22 |        0 |       0 |      25 | 2-9                                                                     
  progresses.js                         |   98.92 |    96.87 |     100 |   98.86 | 158                                                                     
  pullRequests.js                       |   61.76 |    44.44 |     100 |    60.6 | 19-23,26-30,34-38,42-46,54                                              
  queryParser.js                        |    90.9 |       75 |     100 |     100 | 13,15-27                                                                
  rateLimiting.js                       |       0 |        0 |       0 |       0 | 7-11                                                                    
  sendTaskUpdate.js                     |   81.81 |      100 |     100 |   77.77 | 23-24                                                                   
  task-requests.ts                      |   43.75 |     9.52 |      30 |   44.82 | 8-14,19-20,32-33,44-51                                                  
  tasks.js                              |   91.46 |    87.75 |     100 |    92.2 | 43,102-108                                                              
  time.js                               |   78.57 |    41.66 |    62.5 |   81.48 | 7,16,46-51,75                                                           
  userStatus.js                         |   77.96 |    84.61 |   84.21 |   77.27 | 35-40,140-141,189-190,229-230,254-255,278-279,291,314-323               
  username.ts                           |     100 |    66.66 |     100 |     100 | 23-24                                                                   
  users.js                              |   70.83 |     64.7 |    87.5 |   67.44 | ...,61-62,78-79,112-113,124,134-148,177-188,201,241-243,247-260,285-286 
  verifyAuthToken.ts                    |   44.44 |      100 |       0 |   42.85 | 5-12                                                                    
----------------------------------------|---------|----------|---------|---------|-------------------------------------------------------------------------

=============================== Coverage summary ===============================
Statements   : 72.23% ( 7514/10402 )
Branches     : 61.04% ( 2117/3468 )
Functions    : 72.82% ( 1195/1641 )
Lines        : 72.22% ( 6944/9615 )
================================================================================

Additional Notes

ENV values setup instructions https://github.com/Real-Dev-Squad/website-backend/pull/2208#issuecomment-2466672832

joyguptaa commented 1 month ago

@vikhyat187 there are no test written along with it. Is there any reason for that?

vikhyat187 commented 1 month ago

@vikhyat187 there are no test written along with it. Is there any reason for that?

Since this needs integration test to test this functionality need to figure out, if we can connect to AWS via github actions. Can we write unit tests for this? (Haven't written much tests so far). @joyguptaa

vikhyat187 commented 2 weeks ago

TODO ENV variables checklist

cc : @prakashchoudhary07

vinit717 commented 2 weeks ago

Also, please pass me the flow diagram to know the working of the feature

vikhyat187 commented 2 weeks ago

@vinit717 https://docs.google.com/document/u/0/d/1RAAtizqu4tdHkpfS-0ROk_9f8R5EGTBuFMXoulfY9EI/mobilebasic?pli=1#heading=h.9brrijgd260o