https://smsmanagementsystem.herokuapp.com/ This is a system that manages the user's sms
- Users can create contact
- Users can get all contacts
- Users can get a single contact
- Users can update a contact
- Users can delete a contact
- Users can create a message
- Users can get all messages
- Users can get messages sent by a contact
- Users can get messages received by a contact
- Users can delete a message
- name, number
{
"name": "Didi",
"number": "12345678",
}
{
"message": "Contact has been successfully created",
"contact": {
"id": 5,
"name": "Didi",
"number": "12345678",
"updatedAt": "2018-12-01T23:55:47.212Z",
"createdAt": "2018-12-01T23:55:47.212Z"
}
}
{
"contact": [
{
"id": 1,
"name": "Chidinma",
"number": "8056706918",
"createdAt": "2018-12-01T23:03:33.735Z",
"updatedAt": "2018-12-01T23:03:33.735Z",
"sentMessages": [],
"receivedMessages": [
{
"id": 1,
"sender": "Mumsi",
"receiver": "Chidinma",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-01T23:08:37.340Z",
"updatedAt": "2018-12-01T23:08:37.340Z",
"senderId": 4,
"receiverId": 1
}
]
},
{
"id": 4,
"name": "Mumsi",
"number": "8036211209",
"createdAt": "2018-12-01T23:06:22.344Z",
"updatedAt": "2018-12-01T23:06:22.344Z",
"sentMessages": [
{
"id": 1,
"sender": "Mumsi",
"receiver": "Chidinma",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-01T23:08:37.340Z",
"updatedAt": "2018-12-01T23:08:37.340Z",
"senderId": 4,
"receiverId": 1
}
],
"receivedMessages": []
},
{
"id": 5,
"name": "Didi",
"number": "12345678",
"createdAt": "2018-12-01T23:55:47.212Z",
"updatedAt": "2018-12-01T23:57:47.926Z",
"sentMessages": [],
"receivedMessages": []
}
]
}
- where contactId = 5
{
"id": 5,
"name": "Didi",
"number": "12345678",
"createdAt": "2018-12-01T23:55:47.212Z",
"updatedAt": "2018-12-01T23:57:47.926Z",
"sentMessages": [],
"receivedMessages": []
}
- name, number
{
"name": "Didi",
"number": "456789",
}
{
"message": "Successfully updated",
"contact": {
"id": 5,
"name": "Didi",
"number": "456789",
"createdAt": "2018-12-01T23:55:47.212Z",
"updatedAt": "2018-12-01T23:57:47.926Z"
}
}
- where contactId = 5
{
"message": "Successfully deleted",
"contact": {
"id": 5,
"name": "Didi",
"number": "456789",
"createdAt": "2018-12-01T23:55:47.212Z",
"updatedAt": "2018-12-01T23:57:47.926Z"
}
}
- sender, receiver, message, status
{
"sender": "Chidinma",
"receiver": "Mumsi",
"message": "I love you",
}
senderId = 1 receiverId = 4
{
"message": "Message has been successfully sent",
"messageDetail": {
"id": 6,
"sender": "Chidinma",
"receiver": "Mumsi",
"message": "I love you",
"status": "sent",
"senderId": 1,
"receiverId": 4,
"updatedAt": "2018-12-02T00:05:41.095Z",
"createdAt": "2018-12-02T00:05:41.095Z"
}
}
[
{
"id": 1,
"sender": "Mumsi",
"receiver": "Chidinma",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-01T23:08:37.340Z",
"updatedAt": "2018-12-01T23:08:37.340Z",
"senderId": 4,
"receiverId": 1
},
{
"id": 6,
"sender": "Chidinma",
"receiver": "Mumsi",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-02T00:05:41.095Z",
"updatedAt": "2018-12-02T00:05:41.095Z",
"senderId": 1,
"receiverId": 4
}
]
- where senderId = 4
[
{
"id": 1,
"sender": "Mumsi",
"receiver": "Chidinma",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-01T23:08:37.340Z",
"updatedAt": "2018-12-01T23:08:37.340Z",
"senderId": 4,
"receiverId": 1
}
]
- where receiverId = 4
[
{
"id": 6,
"sender": "Chidinma",
"receiver": "Mumsi",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-02T00:05:41.095Z",
"updatedAt": "2018-12-02T00:05:41.095Z",
"senderId": 1,
"receiverId": 4
}
]
- where messageId = 6
{
"message": "Successfully deleted",
"messageDetail": {
"id": 6,
"sender": "Chidinma",
"receiver": "Mumsi",
"message": "I love you",
"status": "sent",
"createdAt": "2018-12-02T00:05:41.095Z",
"updatedAt": "2018-12-02T00:05:41.095Z",
"senderId": 1,
"receiverId": 4
}
}