Pizdec
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Todo REST API
|
||||
|
||||
Spring Boot приложение для управления задачами.
|
||||
|
||||
## Эндпоинты
|
||||
|
||||
- `GET /api/tasks/{id}` — получить задачу по ID
|
||||
- `POST /api/tasks` — создать задачу
|
||||
- `PUT /api/tasks/{id}` — обновить задачу
|
||||
- `DELETE /api/tasks/{id}` — удалить задачу
|
||||
|
||||
## Запуск
|
||||
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
Приложение доступно на `http://localhost:8080`
|
||||
|
||||
## Пример запроса
|
||||
|
||||
```bash
|
||||
# Создать задачу
|
||||
curl -X POST http://localhost:8080/api/tasks \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"title": "Test task", "description": "Description", "completed": false}'
|
||||
|
||||
# Получить задачу
|
||||
curl http://localhost:8080/api/tasks/1
|
||||
|
||||
# Обновить задачу
|
||||
curl -X PUT http://localhost:8080/api/tasks/1 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"title": "Updated", "description": "New description", "completed": true}'
|
||||
|
||||
# Удалить задачу
|
||||
curl -X DELETE http://localhost:8080/api/tasks/1
|
||||
```
|
||||
Reference in New Issue
Block a user