-
Notifications
You must be signed in to change notification settings - Fork 0
/
populate.sh
executable file
·70 lines (65 loc) · 1.54 KB
/
populate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# user 1
user_id=$(curl -X 'POST' \
'http://127.0.0.1:8000/users/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"id": 0,
"email": "alynne@gmail.com",
"name": "Alynne",
"cpf": "411.486.264-17",
"pis": "12021454551",
"password": "alynne123"
}' | jq -r '.id')
curl -X 'POST' \
'http://127.0.0.1:8000/users/'$user_id'/addresses/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"country": "Brasil",
"state": "Ceará",
"city": "Pacatuba",
"zip_code": "61800000",
"street": "rua dos bobos",
"number": 0,
"complement": ""
}'
# user 2
user_id=$(curl -X 'POST' \
'http://127.0.0.1:8000/users/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"id": 0,
"email": "maria@gmail.com",
"name": "Maria",
"cpf": "468.018.600-38",
"pis": "12023522147",
"password": "maria123"
}' | jq -r '.id')
curl -X 'POST' \
'http://127.0.0.1:8000/users/'$user_id'/addresses/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"country": "Brasil",
"state": "Ceará",
"city": "Fortaleza",
"zip_code": "63700000",
"street": "Av. Treze de Maio",
"number": 2081,
"complement": "IFCE"
}'
curl -X 'POST' \
'http://127.0.0.1:8000/users/'$user_id'/addresses/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"country": "Brasil",
"state": "Ceará",
"city": "Fortaleza",
"zip_code": "60160110",
"street": "Rua Ana Bilhar",
"number": 1136,
"complement": "B"
}'