-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.http
75 lines (56 loc) · 1.35 KB
/
api.http
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
@baseUrl = http://localhost:3000
### Register User
POST {{baseUrl}}/api/auth/register
Content-Type: application/json
{
"name": "Example",
"email": "example2@example.com",
"password": "password123"
}
### Login
POST {{baseUrl}}/api/auth/login
Content-Type: application/json
{
"email": "example2@example.com",
"password": "password123"
}
### Current User
GET {{baseUrl}}/api/users/me
### Logout
POST {{baseUrl}}/api/auth/logout
### PIX
POST http://localhost:3000/api/pix
Content-Type: application/json
{
"campaignId": "17e8f7f1-3d0d-4218-a5bd-6b26e8043524",
"amount": 0.03
}
### Process Transaction
POST http://localhost:3000/api/pix/process-transaction/0013
### Fetch Campaigns
GET {{baseUrl}}/api/campaign
### Register Campaign
POST {{baseUrl}}/api/campaign
Content-Type: application/json
{
"title": "Test campaisgn 4",
"description": "Sometshing nice",
"pixKey": "asssdsdssdsd",
"imageUrl": "/img-sample.png",
"goal": 232.44
}
### Delete Campaign
DELETE {{baseUrl}}/api/campaign/dfe9f852-f381-4344-bf1d-bf588f9dec40
### Update Campaign
PUT {{baseUrl}}/api/campaign/cde80006-9104-4f7a-a82f-46b6010341d6
Content-Type: application/json
{
"title": "Test campaign sala",
"description": "Something nice",
"imageUrl": null,
"goal": 55.34,
"totalRaised": 25.40,
"pixKey": "asssdsdsdsd"
}
###
POST http://localhost:3000/api/upload