-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
44 lines (44 loc) · 1.35 KB
/
README
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
1. Create User => localhost:8084/api/v1/auth/register :=POST
{
"firstname" : "Saint",
"lastname" : "Deemene",
"gender": "Male",
"email": "[email protected]",
"phone": "0706740000",
"password" : "saint"
}
2. Create Address => localhost:8084/api/v1/addresses :=POST
{
"country": "Nigeria",
"state": "Port Harcourt",
"city": "Diobu"
}
3. Create Place => localhost:8084/api/v1/places :=POST
{
"name" : "Port Harcourt Golf Club",
"description": "The Port Harcourt Golf club is a prime recreational destination in the old eastern region of Nigeria. It was established as far back as 1928 even before Nigeria gained independence.",
"price": 456.90,
"phone": "08097650000",
"email": "[email protected]",
"addressid": "6227d8fd3d0429e9bc0ed96d"
}
4. Create Travel => localhost:8084/api/v1/travels :=POST
{
"userId": "622a71509c31c1f1095fe749",
"placeId": "6229ad1fd7abae8f7c9dbc28",
"travelDate" : "2022-03-10",
"returnDate": "2022-05-10"
}
5. Login => localhost:8084/api/v1/auth/login :=POST
{
"email": "[email protected]",
"password" : "saint"
}
Dependencies
go get -u github.com/gorilla/mux
go get github.com/spf13/viper
go get go.mongodb.org/mongo-driver/mongo
go get github.com/google/uuid
go get github.com/hako/durafmt
go get github.com/rs/cors
go get github.com/gorilla/handlers