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)
|
**Authentication:** Required (Bearer token)
|
||||||
|
|
||||||
**Response:**
|
**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
|
- `auto_scan_enabled` (boolean): Whether automatic scanning is enabled
|
||||||
- `last_scan_at` (string, optional): Timestamp of last scan
|
- `last_scan_at` (string, optional): Timestamp of last scan
|
||||||
- `next_scan_at` (string, optional): Timestamp of next scheduled scan
|
- `next_scan_at` (string, optional): Timestamp of next scheduled scan
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ http:
|
|||||||
type: json
|
type: json
|
||||||
data: |-
|
data: |-
|
||||||
{
|
{
|
||||||
"scan_frequency_minutes": 30,
|
"scan_poll_interval_seconds": 30,
|
||||||
"auto_scan_enabled": true
|
"auto_scan_enabled": true
|
||||||
}
|
}
|
||||||
auth: inherit
|
auth: inherit
|
||||||
@@ -36,7 +36,7 @@ docs: |-
|
|||||||
**Authentication:** Required
|
**Authentication:** Required
|
||||||
|
|
||||||
**Request Body:**
|
**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
|
- `auto_scan_enabled` (boolean, required): Whether automatic scanning is enabled
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ info:
|
|||||||
seq: 2
|
seq: 2
|
||||||
http:
|
http:
|
||||||
method: PUT
|
method: PUT
|
||||||
url: '{{base_url}}/api/libraries/scan-settings'
|
url: "{{base_url}}/api/libraries/scan-settings"
|
||||||
auth: inherit
|
auth: inherit
|
||||||
body:
|
body:
|
||||||
type: json
|
type: json
|
||||||
json:
|
json:
|
||||||
scan_frequency_minutes: 30
|
scan_poll_interval_seconds: 30
|
||||||
auto_scan_enabled: true
|
auto_scan_enabled: true
|
||||||
headers:
|
headers:
|
||||||
- key: Content-Type
|
- key: Content-Type
|
||||||
value: application/json
|
value: application/json
|
||||||
|
|
||||||
docs: |-
|
docs: |-
|
||||||
## Update System Scan Settings
|
## Update System Scan Settings
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS system_settings (
|
|||||||
|
|
||||||
-- Insert default system settings
|
-- Insert default system settings
|
||||||
INSERT INTO system_settings (setting_key, setting_value, description) VALUES
|
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')
|
('auto_scan_enabled', 'true', 'Whether auto-scanning is enabled system-wide')
|
||||||
ON CONFLICT (setting_key) DO NOTHING;
|
ON CONFLICT (setting_key) DO NOTHING;
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ Authorization: Bearer <token>
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"scan_frequency_minutes": 60,
|
"scan_poll_interval_seconds": 60,
|
||||||
"auto_scan_enabled": true
|
"auto_scan_enabled": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ Retrieve the current system-wide scan settings.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scan_frequency_minutes": 60,
|
"scan_poll_interval_seconds": 60,
|
||||||
"auto_scan_enabled": true
|
"auto_scan_enabled": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Fields**:
|
**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
|
- `auto_scan_enabled` (boolean): Whether auto-scanning is enabled system-wide
|
||||||
|
|
||||||
**Example**:
|
**Example**:
|
||||||
@@ -62,14 +62,14 @@ Update the system-wide scan settings.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scan_frequency_minutes": 30,
|
"scan_poll_interval_seconds": 30,
|
||||||
"auto_scan_enabled": true
|
"auto_scan_enabled": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Fields**:
|
**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)
|
- Minimum: 15 (15 minutes)
|
||||||
- Maximum: 1440 (24 hours)
|
- Maximum: 1440 (24 hours)
|
||||||
- Default: 60
|
- Default: 60
|
||||||
@@ -88,7 +88,7 @@ Update the system-wide scan settings.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scan_frequency_minutes": 30,
|
"scan_poll_interval_seconds": 30,
|
||||||
"auto_scan_enabled": true,
|
"auto_scan_enabled": true,
|
||||||
"message": "scan settings updated successfully"
|
"message": "scan settings updated successfully"
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ Update the system-wide scan settings.
|
|||||||
|
|
||||||
**Validation Rules**:
|
**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
|
- Both fields are required
|
||||||
|
|
||||||
**Example**:
|
**Example**:
|
||||||
@@ -114,7 +114,7 @@ curl -X PUT https://bookhoard.example.com/api/libraries/scan-settings \
|
|||||||
-H "Authorization: Bearer <admin_token>" \
|
-H "Authorization: Bearer <admin_token>" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"scan_frequency_minutes": 30,
|
"scan_poll_interval_seconds": 30,
|
||||||
"auto_scan_enabled": true
|
"auto_scan_enabled": true
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
@@ -125,7 +125,7 @@ curl -X PUT https://bookhoard.example.com/api/libraries/scan-settings \
|
|||||||
|
|
||||||
### Scan Frequency
|
### 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**:
|
**Constraints**:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user