1 00:00:00,700 --> 00:00:05,320 We have now published a working build of our common module so we're now going to go back over to our 2 00:00:05,350 --> 00:00:07,930 auth service inside of our art service. 3 00:00:07,930 --> 00:00:13,480 If we open up that s our C directory open up routes and an open up say the current user file we've got 4 00:00:13,510 --> 00:00:16,260 a ton of broken import statements inside of here. 5 00:00:16,390 --> 00:00:22,450 So to fix all these up we're going to install our common module into the project after we install that 6 00:00:22,480 --> 00:00:25,510 will then go through all the different files and cyber auth project. 7 00:00:25,630 --> 00:00:30,520 We will find any broken import statements like the one we have right here and fix those all up. 8 00:00:30,520 --> 00:00:32,060 So let's get to it. 9 00:00:32,110 --> 00:00:38,980 Back at my terminal I'm going to change over to my off project directory and then I will install my 10 00:00:38,980 --> 00:00:41,470 common module so I'll do an npm install. 11 00:00:41,590 --> 00:00:47,920 Then my organization name which is SGI tickets last comment remember you definitely have a different 12 00:00:47,920 --> 00:00:50,820 organization name to remember what yours is. 13 00:00:50,860 --> 00:00:55,780 You can always go back over to your common directory find the package dot Jason File inside there and 14 00:00:55,780 --> 00:00:57,580 then look up the name fields right there 15 00:01:00,480 --> 00:01:00,720 all right. 16 00:01:00,750 --> 00:01:07,560 So I'm going to install common should be pretty quick and there we go. 17 00:01:09,230 --> 00:01:16,250 So now that we have all that code inside of our off project let's start to update these import statements. 18 00:01:16,250 --> 00:01:20,300 We're going to do this in a very methodical fashion where it's going to go into our SRT directory and 19 00:01:20,300 --> 00:01:24,410 we're going to go through all the files inside of here from top to bottom one at a time and we're going 20 00:01:24,410 --> 00:01:28,370 to make sure that we don't have any errors in any import statements anywhere across the board. 21 00:01:29,240 --> 00:01:31,770 So we will first begin inside of user tests. 22 00:01:31,850 --> 00:01:34,620 Well I don't see any errors with the import statements inside of here. 23 00:01:34,700 --> 00:01:41,560 So let's close this let's go into the roots underscore underscore a test directory current user test 24 00:01:41,560 --> 00:01:42,100 file. 25 00:01:42,250 --> 00:01:45,220 No issues here sign and test file. 26 00:01:45,390 --> 00:01:47,070 No issues here. 27 00:01:47,070 --> 00:01:49,700 Sign out no problem and sign up. 28 00:01:50,160 --> 00:01:50,730 No problem. 29 00:01:52,630 --> 00:01:58,360 All right out of the test directory into current user and right away I see some air start to appear. 30 00:01:58,360 --> 00:02:02,250 So our current user Middleware is no longer defined inside this middleware directory. 31 00:02:02,290 --> 00:02:05,250 We don't even have a middle where's directory inside the module. 32 00:02:05,380 --> 00:02:10,180 So we need to update this import statement to try to get the current user middleware out of our common 33 00:02:10,180 --> 00:02:11,400 module instead. 34 00:02:11,460 --> 00:02:16,250 So all we have to do is update that import statement so put inside of here. 35 00:02:16,270 --> 00:02:19,510 The name of a module SGI tickets slash comment. 36 00:02:19,510 --> 00:02:26,140 And again for you you will have a different organization name so soon as I add that in here goes away. 37 00:02:26,180 --> 00:02:31,290 That's pretty much it we're gonna repeat that same process for all the remaining files. 38 00:02:31,320 --> 00:02:33,340 Let's go over to sign in. 39 00:02:33,550 --> 00:02:35,480 Looks like we've got two errors right here. 40 00:02:35,500 --> 00:02:36,910 Now this is actually kind of nice. 41 00:02:36,910 --> 00:02:42,340 We were importing a middleware an area in separate import statements validate requests and bad request 42 00:02:42,340 --> 00:02:42,980 error. 43 00:02:43,210 --> 00:02:47,650 Both these things are now being exported from the same location inside of our shared module. 44 00:02:47,650 --> 00:02:50,680 So we can actually condense these two imports down to one. 45 00:02:50,680 --> 00:03:02,250 Let me show you how up here I'll put in an import for validate requests and a bad request air from SGI 46 00:03:02,270 --> 00:03:05,270 tickets flash common 47 00:03:08,980 --> 00:03:13,260 all then delete the other two imports and we're good to go. 48 00:03:16,990 --> 00:03:17,700 OK. 49 00:03:18,200 --> 00:03:19,270 That's it for signing. 50 00:03:19,280 --> 00:03:21,470 Let's move on to sign out. 51 00:03:21,480 --> 00:03:25,210 Well no issue here about sign up. 52 00:03:25,240 --> 00:03:26,370 We've got two more here. 53 00:03:26,370 --> 00:03:29,200 So let's fix those up. 54 00:03:29,280 --> 00:03:34,290 I'll do an import of validate re quest and bad. 55 00:03:34,310 --> 00:03:45,590 Request air from area and then delete the old imports. 56 00:03:45,620 --> 00:03:46,180 That looks good. 57 00:03:48,760 --> 00:03:50,260 That's it for our roots directory. 58 00:03:50,260 --> 00:03:54,440 I'll take a look at these services file so inside of services I got password T.S.. 59 00:03:54,490 --> 00:03:56,110 Well no issue here. 60 00:03:56,260 --> 00:03:58,040 Inside of our test directory. 61 00:03:58,040 --> 00:04:01,300 No no issue here but inside of app. 62 00:04:01,320 --> 00:04:02,970 Yes inside of app. 63 00:04:02,990 --> 00:04:06,710 Yes we've got that error handler and the not found error as well. 64 00:04:06,820 --> 00:04:11,780 So let's make sure we get those out of our custom module up here. 65 00:04:11,780 --> 00:04:19,680 I'll get air handler and not found air from SGA tickets common. 66 00:04:20,460 --> 00:04:22,320 And then once again I'll delete the old ones 67 00:04:26,300 --> 00:04:27,400 oh that looks good. 68 00:04:27,440 --> 00:04:28,860 We'll do a quick check inside the file. 69 00:04:28,870 --> 00:04:30,390 No other issues inside of here. 70 00:04:30,490 --> 00:04:34,010 So we are now onto our very last file index dot to yes. 71 00:04:34,090 --> 00:04:36,680 And inside of your note no issues either. 72 00:04:36,680 --> 00:04:38,240 And that's pretty much it. 73 00:04:38,350 --> 00:04:41,340 Now in theory our auto module or auth project should be working. 74 00:04:41,500 --> 00:04:42,260 OK. 75 00:04:42,310 --> 00:04:46,750 So now we should build to start scaffold backup and just make sure we can still access our project inside 76 00:04:46,750 --> 00:04:47,700 the browser. 77 00:04:47,750 --> 00:04:51,750 But let's get to it back inside my terminal. 78 00:04:51,850 --> 00:04:55,890 I had previously closed down scaffold when we started moving all that code around. 79 00:04:55,890 --> 00:05:02,360 So inside of my ticketing project directory I'll do another scaffold death now as we launch this. 80 00:05:02,360 --> 00:05:06,480 We have made a change the package just on file of our off project. 81 00:05:06,620 --> 00:05:10,420 So chances are we're going to have to rebuild that project and install all the dependencies for it. 82 00:05:10,430 --> 00:05:12,830 Once again that might take a moment or two. 83 00:05:12,860 --> 00:05:16,340 So I'm positive you're right here and we'll do a quick test of our project in the next video.