- /users
- /auth/google
- /callback
- /auth/google
if already exixts
{
"message": "User already exists in database",
"data": {
"username": "user123",
"name": "User Test",
"email": "user@test.com",
"picture": "https://lh3.googleusercontent.com/jdkfhsikanf"
}
}if doesn't exist yet
{
"message": "New user added to database",
"data": {
"username": "user123",
"name": "User Test",
"email": "user@test.com",
"picture": "https://lh3.googleusercontent.com/jdkfhsikanf"
}
}- /users
- /signup
- /signin
{
"username": "user123",
"email": "user@test.com",
"password": "admin123",
}if doesn't exist yet
{
"message": "create new user success",
"data": {
"name": "user123",
"email": "user@test.com",
}
}{
"username": "user123",
"password": "admin123"
}if doesn't exist yet
{
"message": "User not found",
"data": null
}if already exist yet
{
"message": "Login successfully",
"data": {
"username": "user123",
"email": "user@test.com",
}
}if already exist but wrong password
{
"message": "Wrong password",
"data": null
}- /doctors
- /all
{
"message": "get all doctors success",
"data": [
{
"id": "doc001",
"name": " dr. Adi Satriyo, Sp.KK",
"address": "Jakarta Selatan"
}
]
}- /appointments
- /all
- /create
- /update/:id
- /delete/:id
{
"message": "get all appointments success",
"data": [
{
"id": "meet309648",
"user_id": "user123",
"doctor_id": "doc001",
"appointment_date": "01-01-2024 10.00",
"status": "upcoming",
"created_at": "December 10, 2024 at 8:28:47 PM UTC+7"
}
]
}{
"user_id": "user123",
"doctor_id": "doc001",
"appointment_date": "01-01-2024 10.00",
"status": ["upcoming", "completed", "canceled"]
}{
"message": "create new appointments success",
"data": {
"id": "meet137619",
"user_id": "user123",
"doctor_id": "doc001",
"appointment_date": "01-01-2024 10.00",
"status": "upcoming"
}
}{
"user_id": "user123",
"doctor_id": "doc001",
"appointment_date": "01-01-2024 10.00",
"status": "upcoming"
}{
"message": "update appointments success",
"data": {
"id": "meet828300",
"user_id": "user123",
"doctor_id": "doc001",
"appointment_date": "01-01-2024 10.00",
"status": "upcoming"
}
}{
"message": "delete appointments success",
"data": {}
}- /api/discussions
- /
- /all
- /user/:id
- /:id
- /api/comments
- /
- /:discussionId/:commentId
- /api/likes
- /
| Name | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Yes | Must be multipart/form-data |
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | The title of the discussion. |
| content | string | Yes | The content of the discussion. |
| category | string | Yes | The category of the discussion. Example: lifestyle. |
| userId | string | Yes | The user ID creating the discussion. |
| file | file | Yes | The file to be uploaded. |
Key | Value
------------|----------------------------------
title | Diskusi Baru
content | Ini adalah konten
category | lifestyle
userId | user123
file | (Select a file to upload)
{
"id": "80ZvMJFFe1ZrcEjbRrD3",
"title": "Diskusi Baru",
"content": "Ini adalah konten",
"category": "lifestyle",
"image": "https://storage.googleapis.com/bucket.firebasestorage.app/discussions.png",
"authorId": "user123",
"createdAt": "2024-12-11T08:36:30.696Z"
}{
"status": "success",
"message": "Get all discussions success",
"data": [
{
"id": "71U3rcDHB8bebMjkZGnz",
"title": "Diskusi Baru",
"content": "Ini adalah konten",
"category": "Teknologi",
"image": "https://storage.googleapis.com/bucket.firebasestorage.app/discussions.png",
"authorId": "user123",
"createdAt": "2024-12-11T08:36:30.696Z"
},
]
}{
"id": "wHjqbpy9OYyJaita0F6u",
"title": "Diskusi Baru",
"content": "Ini adalah konten",
"category": "Teknologi",
"image": "https://storage.googleapis.com/bucket.firebasestorage.app/discussions.png",
"authorId": "user123",
"createdAt": {
"_seconds": 1733886994,
"_nanoseconds": 949000000
}
}[
{
"id": "71U3rcDHB8bebMjkZGnz",
"title": "Diskusi Baru",
"content": "Ini adalah konten",
"category": "Teknologi",
"image": "https://storage.googleapis.com/dermato-ai-441813.firebasestorage.app/discussions%2Fca8351ad-5229-47b8-b46b-a5927114c5e9-Virtual%20Background%20Bangkit%202024.png",
"authorId": "user123",
"createdAt": "2024-12-11T08:36:30.696Z"
},
]{
"discussionId": "71U3rcDHB8bebMjkZGnz",
"userId": "user123",
"content": "sangat membantu!"
}{
"message": "Comment added successfully"
}{
"message": "Comment deleted successfully"
}{
"discussionId": "71U3rcDHB8bebMjkZGnz",
"userId": "user123"
}If the comment has not been liked, it will add likes
{
"message": "Discussion liked"
}If a comment has been liked, the like will be deleted
{
"message": "Like removed"
}