1
00:00:00,210 --> 00:00:00,670
Beautiful.

2
00:00:00,960 --> 00:00:08,039
So now I just set up removed from functionality and I guess let's start by saving our request in the

3
00:00:08,039 --> 00:00:08,660
post, man.

4
00:00:09,150 --> 00:00:17,460
So again, we go to save us or just control or I believe command us and then let's just right the job.

5
00:00:18,970 --> 00:00:26,260
Did a job and of course, we want to set up the same thing for the job and let's just start everything

6
00:00:26,260 --> 00:00:29,190
from scratch again, we have a new request.

7
00:00:29,200 --> 00:00:36,970
We're going to go with the lead and learn the URL is going to be our global variable, then slash jobs

8
00:00:37,210 --> 00:00:39,570
and now back and get all jobs.

9
00:00:39,910 --> 00:00:41,860
Why don't we remove that random one?

10
00:00:42,040 --> 00:00:48,160
So if I go get all jobs, I can clearly see that I'm getting back the random job, not the one that

11
00:00:48,160 --> 00:00:48,970
we just updated.

12
00:00:49,300 --> 00:00:50,920
So why don't we remove this one?

13
00:00:51,310 --> 00:00:53,830
So again, I'm looking for underscore ID.

14
00:00:54,250 --> 00:00:54,950
All right.

15
00:00:54,950 --> 00:00:56,950
Or set it up as my root problem.

16
00:00:57,160 --> 00:01:01,480
And as far as the logic, well, we're not going to be setting up anything in the body.

17
00:01:01,830 --> 00:01:02,910
We really don't need to.

18
00:01:03,280 --> 00:01:08,650
What we're looking for, of course, is the authorization again, want to go with Perito, can access

19
00:01:08,680 --> 00:01:13,230
token awesome lots and we should get back the lead job.

20
00:01:13,240 --> 00:01:18,910
And as far as the functionality, again, we're going to be looking for user and programs.

21
00:01:18,910 --> 00:01:21,460
Both of them are located in request.

22
00:01:21,460 --> 00:01:21,930
Correct.

23
00:01:22,180 --> 00:01:27,010
So one is coming from off middleware and the second one is coming from the primes.

24
00:01:27,340 --> 00:01:31,630
Again, I know this is a repetition, but it's very, very important that we understand that.

25
00:01:32,590 --> 00:01:35,620
Let's copy and paste so we have access to both of these ones.

26
00:01:36,170 --> 00:01:40,940
Then as far as the method name we're looking for, find one and remove.

27
00:01:41,380 --> 00:01:49,960
So let's go here with CONSED and also critical to job search to await and of course, like I said,

28
00:01:49,960 --> 00:01:53,920
job and then find one and remove.

29
00:01:54,100 --> 00:01:55,300
That's one we're looking for.

30
00:01:55,630 --> 00:02:03,550
And as far as the filter object, let's just go again with underscore ID and Jabateh of course, and

31
00:02:03,550 --> 00:02:12,400
the same goes for the user already created that were created by and then we set it up as user ID and

32
00:02:12,400 --> 00:02:13,030
the same deal.

33
00:02:13,240 --> 00:02:20,560
If the job doesn't exist then we send back there and if everything went smoothly then we simply want

34
00:02:20,560 --> 00:02:21,530
to send back to hundred.

35
00:02:21,760 --> 00:02:23,140
That's all we have to do.

36
00:02:23,320 --> 00:02:29,530
And I'll do that by cheating a little bit, where I'll take this code from the update one and just copy

37
00:02:29,530 --> 00:02:30,010
and paste.

38
00:02:30,310 --> 00:02:31,420
So we're throwing the error.

39
00:02:31,420 --> 00:02:37,420
If there is no job or if everything is successful, we don't need to actually send back the Drayson

40
00:02:37,600 --> 00:02:38,020
again.

41
00:02:38,170 --> 00:02:40,570
That's really going to depend on your front end.

42
00:02:40,570 --> 00:02:43,240
But in my case, I'm just looking for that two hundred.

43
00:02:43,540 --> 00:02:48,070
So if there's some kind of error, then of course I have one functionality on my front end.

44
00:02:48,280 --> 00:02:54,040
However, if everything went smoothly, if I remove the job, then of course I'm just getting back that

45
00:02:54,190 --> 00:02:54,730
two hundred.

46
00:02:54,910 --> 00:02:55,380
That's it.

47
00:02:55,660 --> 00:02:59,890
So now of course let's test it out in our postman where we have the job.

48
00:02:59,890 --> 00:03:00,730
We want to remove it.

49
00:03:00,730 --> 00:03:01,840
Let's send it here.

50
00:03:02,020 --> 00:03:07,380
As you can see, I'm not getting anything back, but I have two hundred, which is always a good sign.

51
00:03:07,660 --> 00:03:11,200
So now of course, let's go to get all jobs or not.

52
00:03:11,470 --> 00:03:12,730
Let's save this one first.

53
00:03:13,000 --> 00:03:16,330
Let's say save as you say, remove or delete job.

54
00:03:16,810 --> 00:03:17,710
It's really up to you.

55
00:03:18,100 --> 00:03:20,320
The job, save it.

56
00:03:20,540 --> 00:03:28,210
And when it comes to get all jobs, of course I can send it and count is back to three when it comes

57
00:03:28,210 --> 00:03:28,750
to honor.

58
00:03:29,080 --> 00:03:34,030
And with this in place, let's just quickly try out to login as Peter.

59
00:03:34,450 --> 00:03:36,580
So we're just simply want to change the name here.

60
00:03:37,030 --> 00:03:38,110
I'm going to go with Peter.

61
00:03:38,140 --> 00:03:39,640
The password is still the same.

62
00:03:40,030 --> 00:03:42,460
And of course, I just need to be correct with my email.

63
00:03:42,760 --> 00:03:43,540
I send it.

64
00:03:43,540 --> 00:03:45,070
Yep, I get the token.

65
00:03:45,430 --> 00:03:48,460
And now let's take a look at all the jobs that Peter has.

66
00:03:49,030 --> 00:03:51,100
And of course, it's only one.

67
00:03:51,370 --> 00:03:55,450
So now let me grab this idea and first I'll change it.

68
00:03:55,570 --> 00:03:57,550
So first we'll go with update.

69
00:03:58,090 --> 00:04:02,860
And as far as the body, I'll just pass in random.

70
00:04:03,100 --> 00:04:07,060
And when it comes to your position, I'm going to go back to the internal one.

71
00:04:08,000 --> 00:04:10,020
In turn here, so it's sounded.

72
00:04:10,270 --> 00:04:15,770
That's the response I have company around them and of course, I want to also see whether I can delete

73
00:04:15,770 --> 00:04:15,920
it.

74
00:04:16,190 --> 00:04:24,470
So when it comes to daily job, I'll take the Samiti, I'll go back here, I'll copy and paste, and

75
00:04:24,470 --> 00:04:27,360
once we get all jobs for Peter now.

76
00:04:27,650 --> 00:04:33,470
So let's go back to all the jobs and once we run it now, of course, we have jobs as empty array and

77
00:04:33,470 --> 00:04:34,220
count zero.

78
00:04:34,230 --> 00:04:37,570
But keep in mind, this is still a successful response.

79
00:04:38,090 --> 00:04:43,550
It's just Peter hasn't created any jobs or in our case, we created it.

80
00:04:43,550 --> 00:04:45,410
And then, of course, we removed it.

81
00:04:45,710 --> 00:04:51,470
And with this in place, we're done setting up the core functionality for our application.

