File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -495,12 +495,14 @@ const migrate = async (req, res) => {
495
495
await batchWrite . commit ( ) ;
496
496
}
497
497
498
- return res . send ( {
499
- statusCode : 201 ,
498
+ return res . staus ( 200 ) . json ( {
499
+ statusCode : 200 ,
500
500
message : "All Users github_user_id added successfully" ,
501
501
} ) ;
502
502
} catch ( error ) {
503
- return res . status ( 500 ) . send ( "Internal server error" ) ;
503
+ return res . status ( 500 ) . json ( {
504
+ message : "Internal Server Error" ,
505
+ } ) ;
504
506
}
505
507
} ;
506
508
Original file line number Diff line number Diff line change @@ -1039,14 +1039,6 @@ describe("Users", function () {
1039
1039
} ) ;
1040
1040
1041
1041
describe ( "POST /users/migrate" , function ( ) {
1042
- beforeEach ( async function ( ) {
1043
- superUserId = await addUser ( superUser ) ;
1044
- superUserAuthToken = authService . generateAuthToken ( { userId : superUserId } ) ;
1045
- } ) ;
1046
-
1047
- afterEach ( async function ( ) {
1048
- await cleanDb ( ) ;
1049
- } ) ;
1050
1042
it ( "Should return 401 when user is unauthorize" , function ( done ) {
1051
1043
chai
1052
1044
. request ( app )
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ describe("users", function () {
102
102
103
103
it ( "should update the github_id in the user collection" , async function ( ) {
104
104
const userData = userDataArray [ 0 ] ;
105
- userData . github_user_id = "Yash Sinha" ;
105
+ userData . github_id = "Yash Sinha" ;
106
106
107
107
// Add the user the first time
108
108
const { userId } = await users . addOrUpdate ( userData ) ;
You can’t perform that action at this time.
0 commit comments