# Hero Banner Reorder - Test Guide

## Step 1: Get all banners to find IDs
```bash
curl -X GET http://localhost:3001/api/v1/site-settings/hero-banners/all \
  -H "Content-Type: application/json"
```

**Expected Response:**
```json
{
  "success": true,
  "message": "All hero banners retrieved successfully",
  "data": [
    { "id": "banner-1", "displayOrder": 0, "title": "Banner 1", ... },
    { "id": "banner-2", "displayOrder": 1, "title": "Banner 2", ... },
    { "id": "banner-3", "displayOrder": 2, "title": "Banner 3", ... }
  ]
}
```

## Step 2: Reorder a banner (move banner-2 to position 0)
```bash
curl -X POST http://localhost:3001/api/v1/site-settings/hero-banners/banner-2/reorder \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "displayOrder": 0
  }'
```

**Expected Response:**
```json
{
  "success": true,
  "message": "Hero banner reordered successfully",
  "data": [
    { "id": "banner-2", "displayOrder": 0, "title": "Banner 2", ... },
    { "id": "banner-1", "displayOrder": 1, "title": "Banner 1", ... },
    { "id": "banner-3", "displayOrder": 2, "title": "Banner 3", ... }
  ]
}
```

## Step 3: Verify with get all again
```bash
curl -X GET http://localhost:3001/api/v1/site-settings/hero-banners/all \
  -H "Content-Type: application/json"
```

## Possible Issues & Solutions

### Issue 1: 401 Unauthorized
- **Cause:** Missing or invalid auth token
- **Fix:** Get a valid admin token first from the login endpoint

### Issue 2: 404 Not Found
- **Cause:** Banner ID doesn't exist
- **Fix:** Use valid banner IDs from Step 1

### Issue 3: 400 Bad Request
- **Cause:** Invalid displayOrder value
- **Fix:** Ensure displayOrder is a valid number >= 0

### Issue 4: Endpoint not found (404)
- **Cause:** Route not registered or server not running
- **Fix:** Restart the dev server: `npm run dev`
