https://github.com/anmamun0/datadonor-webapp
Backend
https://github.com/anmamun0/datadonor-webapp
django-rest-framework postgressql
Last synced: 10 months ago
JSON representation
Backend
- Host: GitHub
- URL: https://github.com/anmamun0/datadonor-webapp
- Owner: anmamun0
- Created: 2025-01-21T16:06:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-08T18:52:10.000Z (11 months ago)
- Last Synced: 2025-02-08T19:33:59.074Z (11 months ago)
- Topics: django-rest-framework, postgressql
- Language: JavaScript
- Homepage: https://datadonor-backend.vercel.app
- Size: 992 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data.Doner-Backend
## API Endpoints
### Authentication APIs
- **Register API:** [http://127.0.0.1:8000/accounts/](http://127.0.0.1:8000/accounts/)
- **Login API:** [http://127.0.0.1:8000/accounts/login/](http://127.0.0.1:8000/accounts/login/)
- **Logout API:** [http://127.0.0.1:8000/accounts/logout/](http://127.0.0.1:8000/accounts/logout/)
- **All User List:** [http://127.0.0.1:8000/accounts/users/](http://127.0.0.1:8000/accounts/users/)
### User Profile APIs
- **All Profile List:** [http://127.0.0.1:8000/accounts/profiles/](http://127.0.0.1:8000/accounts/profiles/)
**Filters:**
- `?user_id=`
**PUT Requests:**
- `/profiles//update-image/` - Update profile image with `{'image': }`
- `/profiles//update-profile/` - Update profile with the following fields:
- **User:** `{'first_name', 'last_name', 'email'}`
- **Profile:** `{'phone', 'age', 'gender', 'blood', 'division', 'country'}`
### Event Management APIs
- **All Events List:** [http://127.0.0.1:8000/event/events/](http://127.0.0.1:8000/event/events/)
**GET Requests:**
- `?user=`
- `?doner=`
**PUT Requests:**
- `/events//accepted/` - Accept an event request with `{'doner_id', 'doner_message'}`
- `/events//received/` - Mark the event creator as having received blood with `{}`
**Example:**
```json
{
"user": 14,
"title": "Blood Donation Event",
"description": "A description of the blood donation event",
"event_date": "2025-06-19",
"event_time": "14:00",
"blood": "A+"
}
```
- **Create Event:** [http://127.0.0.1:8000/event/events/create/](http://127.0.0.1:8000/event/events/create/)
**POST Request Body:**
```json
{
"user": 1,
"title": "Emergency Blood Donation",
"description": "Description of the event",
"event_date": "2025-01-25",
"event_time": "14:30:00"
}
```
**Filters:**
- `?user=`
- `?status=Completed`
- `?event_id=`
- `?doner=`
- `?event_date=`
- `?blood=`
- `?last_donate=`
##### data.doner-backend
##### data.doner-123
# DataDonor-webapp
# DataDonor-webapp