mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Align frontend device types with backend canonical list
Replaces the old frontend-only `router` type and adds the full set used by the backend: network_appliance, home_security, home_appliance, watch, pc, gaming_console. Adds an `apiName` getter to map camelCase enum values to the snake_case strings the API expects. Updates the unknown device icon to a question mark. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
23b8858259
commit
e28eb349ba
@@ -104,7 +104,7 @@ class BackendAPI {
|
||||
if (owner != null && owner.isNotEmpty) params['owner'] = owner;
|
||||
if (deviceType != null) {
|
||||
params['device_type'] =
|
||||
deviceType == DeviceType.unknown ? '' : deviceType.name;
|
||||
deviceType == DeviceType.unknown ? '' : deviceType.apiName;
|
||||
}
|
||||
|
||||
final response = await _dio.get('/devices', queryParameters: params);
|
||||
|
||||
Reference in New Issue
Block a user