-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_doc.json
More file actions
146 lines (137 loc) · 3.14 KB
/
Copy pathapi_doc.json
File metadata and controls
146 lines (137 loc) · 3.14 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// sign up api
1.https://student-aid-main.herokuapp.com/auth/signup
{
"name":"Habibur Rahman Sobuj",
"email":"sobujhd@gmail.com",
"password":"Admin123///"
}
// sign in api
2.https://student-aid-main.herokuapp.com/auth/signin
{
"email":"sobujhd@gmail.com",
"password":"Admin123///"
}
// user information update
3.https://student-aid-main.herokuapp.com/auth/update-info/<id>
{
"name":"Md Habibur Rahman",
"varsity":"HSTU",
"phone":"01797972527",
archive:req.body.archive,
fund_collection:req.body.fund_collection,
}
//update donate
3.https://student-aid-main.herokuapp.com/auth/update-donate/<id>
{
"donate":{
post_id: currentPost._id,
donate_id: currentPost.donate,
amount: amount,
};
}
3.https://student-aid-main.herokuapp.com/auth/update-receive/<id>
{
post_id:{
type: mongoose.Types.ObjectId,
ref:"Post"
},
collected_amount:{
type: mongoose.Types.ObjectId,
ref:"Donate"
},
total_amount:{
type:String
}
}
//update post
3.https://student-aid-main.herokuapp.com/auth/update-post/<id>
{
"post_id":"63427a4539b1e21edecc7f02",
}
// user pass update
4.https://student-aid-main.herokuapp.com/auth/update-pass/<id>
{
"password":"Admin111///"
}
// user email update
5.https://student-aid-main.herokuapp.com/auth/update-email/<id>
{
"email":"sobujhd2@gmail.com"
}
// user avatar update
6.http://localhost:5000/auth/update-avatar/<id>
{
// upload a file
}
// user multiple document upload
7.http://localhost:5000/auth/update-documents/<id>
{
// upload multiple files
}
// create help post
8.http://localhost:5000/help/post
{
"title":"demo title with user id 2",
"description":"demo description",
"amount":"34",
"tags":["2","345"],
"user":<user id>,
"donate":<donate_id>
}
// update help post
9. http://localhost:5000/help/post/update/<post_id>
{
"title":"hi",
"description":"hlw",
"amount":"345",
"tags":["tag1","tag3"],
"status":"accepted",
"user":<user_id>,
}
// get user
10.http://localhost:5000/auth/user/<id>
{
// authorization must be needed
}
// get all post
11.http://localhost:5000/help/post/<page no>
N.B=> per page a 10 ta kre show krbe.
{
// authorization must be needed
}
// get specific post
12.http://localhost:5000/help/spost/:id
{
// authorization must be needed
}
// create donate
13. http://localhost:5000/donate/init
{
"collected":"300",
"need":"300",
"total_amount":"5000",
"donors":{
"donar_id":"634275d339b1e21edecc7ef1",
"weight":"360"
},
"owner":"633c4f54d2da05165640d74d"
}
// update donate
14.http://localhost:5000/donate/update/<donate_id>
{
"collected":"400",
"need":"4600",
"total_amount":"5000",
"donors":{
"donar_id":"634277ea39b1e21edecc7efb",
"weight":"560"
}
}
// payment
15.http://localhost:5000/payment/payment-request
16.http://localhost:5000/payment/payment-notification
17.http://localhost:5000/payment/payment-success
18.http://localhost:5000/payment/payment-fail
19.http://localhost:5000/payment/payment-cancel
// get all users
20.http://localhost:5000/auth/users