mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
fix(database): safely type indexer fields and headers
This commit is contained in:
@@ -6,11 +6,11 @@ part 'external_module.g.dart';
|
||||
@HiveType(typeId: 26, adapterName: 'LunaExternalModuleAdapter')
|
||||
class LunaExternalModule extends HiveObject {
|
||||
@JsonKey()
|
||||
@HiveField(0)
|
||||
@HiveField(0, defaultValue: '')
|
||||
String displayName;
|
||||
|
||||
@JsonKey()
|
||||
@HiveField(1)
|
||||
@HiveField(1, defaultValue: '')
|
||||
String host;
|
||||
|
||||
LunaExternalModule({
|
||||
|
||||
@@ -7,20 +7,20 @@ part 'indexer.g.dart';
|
||||
@HiveType(typeId: 1, adapterName: 'LunaIndexerAdapter')
|
||||
class LunaIndexer extends HiveObject {
|
||||
@JsonKey()
|
||||
@HiveField(0)
|
||||
@HiveField(0, defaultValue: '')
|
||||
String displayName;
|
||||
|
||||
@JsonKey()
|
||||
@HiveField(1)
|
||||
@HiveField(1, defaultValue: '')
|
||||
String host;
|
||||
|
||||
@JsonKey(name: 'key')
|
||||
@HiveField(2)
|
||||
@HiveField(2, defaultValue: '')
|
||||
String apiKey;
|
||||
|
||||
@JsonKey()
|
||||
@HiveField(3)
|
||||
Map headers;
|
||||
@HiveField(3, defaultValue: <String, String>{})
|
||||
Map<String, String> headers;
|
||||
|
||||
@JsonKey()
|
||||
@HiveField(4)
|
||||
|
||||
Reference in New Issue
Block a user