Full eatured Golang App
End points:
User Authenticity:
input:
{
"name":"nase",
"email":"nas@gmail.com",
"password":"nas12345"
}
Response:
{
"id": 1,
"name": "nase",
"email": "nas@gmail.com",
"Password": "$2a$04$wJcYp.0ogKNJqniCKfKMRuxsJ4vPfnV275goiHfYvBYUBkZk8QH4K"
}
Input:
{
"name":"nase",
"email":"nas@gmail.com",
"password":"nas12345"
}
Response:
{
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE2NTExNDc2NTEsInVzZXJfaWQiOjF9.WP8lJkZJFXD9fE4UFPcC68nXdCKAqPe6P83khvaTEhM",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE2NTExNDQwNTEsInVzZXJfaWQiOjF9.Ec45_KMIN5HU9sgUWedQgRGCNz5QjJDLHMwmH3aijMg"
}
Response:
{
"data": {
"id": 1,
"name": "nase",
"email": "nas@gmail.com"
},
"message": "success"
}
Category
Response:
[
{
"id": 1,
"name": "Drama"
},
{
"id": 2,
"name": "Advanture"
}
]
Input:
{
"name":"Romantic"
}
Response:
[
{
"id": 1,
"name": "Romantic"
},
{
"id": 2,
"name": "Advanture"
}
]
input:
{
"name":"Drama"
}
Response:
{
"id": 1,
"name": "Drama"
}
Posts
Input:
{
"id": 1,
"title": " this is fourth title--",
"description": "this is description---",
"image": "media/images/Screenshot from 2022-04-27 13-50-20.png",
"category": 1
}
Response:
{
"id": 1,
"title": " this is fourth title--",
"description": "this is description---",
"image": "media/images/Screenshot from 2022-04-27 13-50-20.png",
"created_at": "2022-04-28T16:25:12.45206321+06:00",
"updated_at": "2022-04-28T16:25:12.45206321+06:00",
"category": {
"id": 2,
"name": "Advanture"
}
}
Response:
{
"id": 1,
"title": " this is fourth title--",
"description": "this is description---",
"image": "media/images/Screenshot from 2022-04-27 13-50-20.png",
"created_at": "2022-04-28T16:25:12.45206321+06:00",
"updated_at": "2022-04-28T16:25:12.45206321+06:00",
"category": {
"id": 2,
"name": "Advanture"
}
}
Input:
{
"title": " this is fourth title",
"description": "this is description---",
"image": "media/images/Screenshot from 2022-04-27 13-50-20.png",
"category": 1
}
Response:
{
"id": 1,
"title": " this is fourth title--",
"description": "this is description---",
"image": "media/images/Screenshot from 2022-04-27 13-50-20.png",
"created_at": "2022-04-28T16:25:12.45206321+06:00",
"updated_at": "2022-04-28T16:25:12.45206321+06:00",
"category": {
"id": 2,
"name": "Advanture"
}
}