refactor(api): rename scan_frequency_minutes to scan_poll_interval_seconds
- Update API field from scan_frequency_minutes to scan_poll_interval_seconds - Update database schema default value key - Update Bruno API collection requests and documentation - Update OpenAPI documentation examples and field descriptions
This commit is contained in:
@@ -29,7 +29,7 @@ docs: |-
|
||||
**Authentication:** Required (Bearer token)
|
||||
|
||||
**Response:**
|
||||
- `scan_frequency_minutes` (number): Minutes between automatic scans (minimum 1)
|
||||
- `scan_poll_interval_seconds` (number): Minutes between automatic scans (minimum 1)
|
||||
- `auto_scan_enabled` (boolean): Whether automatic scanning is enabled
|
||||
- `last_scan_at` (string, optional): Timestamp of last scan
|
||||
- `next_scan_at` (string, optional): Timestamp of next scheduled scan
|
||||
|
||||
@@ -13,7 +13,7 @@ http:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"scan_frequency_minutes": 30,
|
||||
"scan_poll_interval_seconds": 30,
|
||||
"auto_scan_enabled": true
|
||||
}
|
||||
auth: inherit
|
||||
@@ -36,7 +36,7 @@ docs: |-
|
||||
**Authentication:** Required
|
||||
|
||||
**Request Body:**
|
||||
- `scan_frequency_minutes` (integer, required): Minutes between automatic scans (15-1440)
|
||||
- `scan_poll_interval_seconds` (integer, required): Minutes between automatic scans (15-1440)
|
||||
- `auto_scan_enabled` (boolean, required): Whether automatic scanning is enabled
|
||||
|
||||
**Response:**
|
||||
|
||||
@@ -4,22 +4,22 @@ info:
|
||||
seq: 2
|
||||
http:
|
||||
method: PUT
|
||||
url: '{{base_url}}/api/libraries/scan-settings'
|
||||
url: "{{base_url}}/api/libraries/scan-settings"
|
||||
auth: inherit
|
||||
body:
|
||||
type: json
|
||||
json:
|
||||
scan_frequency_minutes: 30
|
||||
scan_poll_interval_seconds: 30
|
||||
auto_scan_enabled: true
|
||||
headers:
|
||||
- key: Content-Type
|
||||
value: application/json
|
||||
- key: Content-Type
|
||||
value: application/json
|
||||
|
||||
docs: |-
|
||||
## Update System Scan Settings
|
||||
|
||||
|
||||
Updates system-wide scan settings that apply to all libraries.
|
||||
|
||||
|
||||
**Authentication**: Admin token required
|
||||
**Request**: Scan frequency (15-1440 minutes) and enabled status
|
||||
**Response**: Success message
|
||||
|
||||
@@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS system_settings (
|
||||
|
||||
-- Insert default system settings
|
||||
INSERT INTO system_settings (setting_key, setting_value, description) VALUES
|
||||
('scan_frequency_minutes', '60', 'How often to scan all libraries in minutes'),
|
||||
('scan_poll_interval_seconds', '60', 'How often to scan all libraries in minutes'),
|
||||
('auto_scan_enabled', 'true', 'Whether auto-scanning is enabled system-wide')
|
||||
ON CONFLICT (setting_key) DO NOTHING;
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ Authorization: Bearer <token>
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"scan_frequency_minutes": 60,
|
||||
"scan_poll_interval_seconds": 60,
|
||||
"auto_scan_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
@@ -31,14 +31,14 @@ Retrieve the current system-wide scan settings.
|
||||
|
||||
```json
|
||||
{
|
||||
"scan_frequency_minutes": 60,
|
||||
"scan_poll_interval_seconds": 60,
|
||||
"auto_scan_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
**Fields**:
|
||||
|
||||
- `scan_frequency_minutes` (integer): How often to scan all libraries in minutes (15-1440)
|
||||
- `scan_poll_interval_seconds` (integer): How often to scan all libraries in minutes (15-1440)
|
||||
- `auto_scan_enabled` (boolean): Whether auto-scanning is enabled system-wide
|
||||
|
||||
**Example**:
|
||||
@@ -62,14 +62,14 @@ Update the system-wide scan settings.
|
||||
|
||||
```json
|
||||
{
|
||||
"scan_frequency_minutes": 30,
|
||||
"scan_poll_interval_seconds": 30,
|
||||
"auto_scan_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
**Fields**:
|
||||
|
||||
- `scan_frequency_minutes` (integer, required): How often to scan all libraries in minutes
|
||||
- `scan_poll_interval_seconds` (integer, required): How often to scan all libraries in minutes
|
||||
- Minimum: 15 (15 minutes)
|
||||
- Maximum: 1440 (24 hours)
|
||||
- Default: 60
|
||||
@@ -88,7 +88,7 @@ Update the system-wide scan settings.
|
||||
|
||||
```json
|
||||
{
|
||||
"scan_frequency_minutes": 30,
|
||||
"scan_poll_interval_seconds": 30,
|
||||
"auto_scan_enabled": true,
|
||||
"message": "scan settings updated successfully"
|
||||
}
|
||||
@@ -104,7 +104,7 @@ Update the system-wide scan settings.
|
||||
|
||||
**Validation Rules**:
|
||||
|
||||
- `scan_frequency_minutes` must be between 15 and 1440 minutes
|
||||
- `scan_poll_interval_seconds` must be between 15 and 1440 minutes
|
||||
- Both fields are required
|
||||
|
||||
**Example**:
|
||||
@@ -114,7 +114,7 @@ curl -X PUT https://bookhoard.example.com/api/libraries/scan-settings \
|
||||
-H "Authorization: Bearer <admin_token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"scan_frequency_minutes": 30,
|
||||
"scan_poll_interval_seconds": 30,
|
||||
"auto_scan_enabled": true
|
||||
}'
|
||||
```
|
||||
@@ -125,7 +125,7 @@ curl -X PUT https://bookhoard.example.com/api/libraries/scan-settings \
|
||||
|
||||
### Scan Frequency
|
||||
|
||||
The `scan_frequency_minutes` setting determines how often the system will automatically scan all libraries for new media files. The scheduler will trigger scans for all libraries at the configured interval.
|
||||
The `scan_poll_interval_seconds` setting determines how often the system will automatically scan all libraries for new media files. The scheduler will trigger scans for all libraries at the configured interval.
|
||||
|
||||
**Constraints**:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user