-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopulate.sh
More file actions
executable file
·59 lines (53 loc) · 1.76 KB
/
populate.sh
File metadata and controls
executable file
·59 lines (53 loc) · 1.76 KB
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
curl -X 'POST' \
'http://localhost:5000/v1/user/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "amit",
"email": "amit@gmail.com",
"password": "123",
"role": "user",
"address": "aadssd",
"profile_pic": "20aab704e5532523652ac9d908d3b8de"
}'
curl -X 'POST' \
'http://localhost:5000/v1/user/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "shir",
"email": "shir@gmail.com",
"password": "123",
"role": "user",
"address": "aadssd",
"profile_pic": "20aab704e5532523652ac9d908d3b8de"
}'
curl -X 'PUT' \
'http://localhost:5000/v1/admin/promote/1' \
-H 'accept: application/json'
curl -X 'GET' \
'http://localhost:5000/v1/admin/users/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwicm9sZSI6ImFkbWluIiwiaWF0IjoxNjU5NDI3MjQwLCJleHAiOjE2NTk1MTM2NDB9.QpYD330lcw_AxJR16FKGWugQk0HNHRhOqonaH75GUDE'
curl -X 'POST'
'http://localhost:5000/v1/admin/upload-pic/' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@src/assets/bud.jpg;type=image/jpeg' | \
python3 -c "import sys, json; print(json.load(sys.stdin)['filename'])"
curl -X 'POST' \
'http://localhost:5000/v1/admin/upload-pic/' \
--silent -H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@src/assets/bud.jpg;type=image/jpeg'
# | python3 -c 'import sys, json; print(json.load(sys.stdin)['filename'])' \
curl -X 'POST' \
'http://localhost:5000/v1/admin/new-beer/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
--proxy "http://localhost:8080" \
-d '{
"name": "Beer!!!",
"price": 12,
"picture": "20aab704e5532523652ac9d908d3b8de"
}'