Request:
- body:
{
"email": "anto@mail.com",
"password": "antoanto",
"username": "anto"
}Response (201 - Created)
{
"id": 3,
"email": "anto@mail.com"
}
Request:
- body: name is for cafe name
{
"email": "ardi@mail.com",
"password": "ardiardi",
"username": "ardiardi",
"longitude": 106.805534,
"latitude": -6.272444,
"name": "cafe hacktiv",
"address": "hacktiv 8"
}Response (201 - Created)
{
"id": 4,
"email": "ardi@mail.com"
}
- body:
{
"email": "ardi@mail.com",
"password": "ardiardi"
}Response (201 - Created)
{
"access_token": string,
"id": number,
"role": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
[
{
"id": 1,
"description": String,
"photo": String,
"location": {
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"type": "Point",
"coordinates": [106.805234, -6.272244]
},
"name": "cafe 1",
"address": "cafe 1",
"UserId": 2,
"createdAt": "2023-12-18T09:10:51.947Z",
"updatedAt": "2023-12-18T09:10:51.947Z"
},
...
]
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body (FORM DATA):
{
"photo": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"description": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"name": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"address": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body (FORM DATA):
{
"imgUrl": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Deleted)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body (FORM DATA):
{
"startTime":"2023-12-16T05:43:33.437Z",
"endTime":"2023-12-16T06:43:33.437Z",
"photo": String,
"eventName":String,
"CategoryId":Number
}Response (200 - Created)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"description": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"eventName": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"startTime": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"endTime": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
[
{
"eventId": 1,
"eventPhoto": String,
"id": 1,
"startTime": "2023-12-16T05:43:33.437Z",
"endTime": "2023-12-16T05:43:33.437Z",
"description": null,
"photo": String,
"eventName": "event buat 1",
"CategoryId": 1,
"CafeId": 1,
"createdAt": "2023-12-18T09:10:51.947Z",
"updatedAt": "2023-12-18T09:10:51.947Z",
"location": {
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"type": "Point",
"coordinates": [106.805234, -6.272244]
},
"name": "cafe 1",
"address": "cafe 1",
"UserId": 2,
"categoryName": "music"
},
...
]
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
{
"id": 1,
"startTime": "2023-12-16T05:43:33.437Z",
"endTime": "2023-12-16T05:43:33.437Z",
"description": null,
"photo": String,
"eventName": "event buat 1",
"CategoryId": 1,
"CafeId": 1,
"createdAt": "2023-12-18T09:14:56.123Z",
"updatedAt": "2023-12-18T09:14:56.123Z",
"Cafe": {
"id": 1,
"description": null,
"photo": String,
"location": {
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"type": "Point",
"coordinates": [106.805234, -6.272244]
},
"name": "cafe 1",
"address": "cafe 1",
"UserId": 2,
"createdAt": "2023-12-18T09:10:51.947Z",
"updatedAt": "2023-12-18T09:10:51.947Z"
},
"Category": {
"id": 1,
"name": "music",
"thumbnail": String,
"createdAt": "2023-12-18T08:58:21.814Z",
"updatedAt": "2023-12-18T08:58:21.814Z"
}
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
{
"id": 1,
"OccasionId": 1,
"UserId": 2,
"RoomId": String,
"createdAt": "2023-12-18T09:14:56.143Z",
"updatedAt": "2023-12-18T09:14:56.143Z"
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
{
"id": 1,
"time": "2023-12-19T03:44:56.574Z",
"message": "test 1",
"RoomId": 1,
"UserId": 2,
"createdAt": "2023-12-19T03:44:56.576Z",
"updatedAt": "2023-12-19T03:44:56.576Z",
"User": {
"id": 2,
"email": "ardi@mail.com",
"bio": null,
"avatar": string,
"role": "owner",
"username": "ardiardi",
"createdAt": "2023-12-18T09:10:51.821Z",
"updatedAt": "2023-12-18T09:10:51.821Z"
}
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
[
{
"id": 1,
"time": "2023-12-19T03:44:56.574Z",
"message": "test 1",
"RoomId": 1,
"UserId": 2,
"createdAt": "2023-12-19T03:44:56.576Z",
"updatedAt": "2023-12-19T03:44:56.576Z",
"User": {
"id": 2,
"email": "ardi@mail.com",
"bio": null,
"avatar": "https://i.pinimg.com/originals/b8/9f/27/b89f270e2aee0577efc5e604f08132d1.jpg",
"role": "owner",
"username": "ardiardi",
"createdAt": "2023-12-18T09:10:51.821Z",
"updatedAt": "2023-12-18T09:10:51.821Z"
}
},
...
]
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}Response (200 - Created)
{
"id": 2,
"email": "ardi@mail.com",
"username": "ardiardi",
"role": "owner",
"avatar": String,
"bio": null,
"Rooms": [
{
"id": 1,
"OccasionId": 1,
"UserId": 2,
"RoomId": "2_1702890896142",
"createdAt": "2023-12-18T09:14:56.143Z",
"updatedAt": "2023-12-18T09:14:56.143Z",
"Occasion": {
"id": 1,
"startTime": "2023-12-16T05:43:33.437Z",
"endTime": "2023-12-16T05:43:33.437Z",
"description": null,
"photo": String,
"eventName": "event buat 1",
"CategoryId": 1,
"CafeId": 1,
"createdAt": "2023-12-18T09:14:56.123Z",
"updatedAt": "2023-12-18T09:14:56.123Z"
}
},
...
]
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"bio": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body (FORM DATA):
{
"avatar": String
}Response (200 - Updated)
{
"message": string
}
- Header:
{
"Authorization": "Bearer <JWT TOKEN>"
}- body:
{
"username": String
}Response (200 - Updated)
{
"message": string
}
Response (400 - Bad Request)
{
"message": string
}Response (401 - Unauthorized)
{
"message": "Invalid token"
}Response (403 - Forbiden)
{
"message": string
}Response (404 - Unauthorized)
{
"message": String
}Response (500 - Internal Server Error)
{
"message": "Internal server error"
}