From be3bd569f4ea2ce8f3ed8c630b57d0f8f17fb22b Mon Sep 17 00:00:00 2001 From: krawieck Date: Tue, 11 Aug 2020 19:54:12 +0200 Subject: [PATCH] Replace `type_` with `type` --- lib/client/models/search.dart | 5 +++-- lib/client/models/search.g.dart | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/client/models/search.dart b/lib/client/models/search.dart index e60d767..16f045f 100644 --- a/lib/client/models/search.dart +++ b/lib/client/models/search.dart @@ -10,14 +10,15 @@ part 'search.g.dart'; /// based on https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#search @JsonSerializable(createToJson: false) class Search { - final String type_; + @JsonKey(name: "type_") + final String type; final List comments; final List posts; final List communities; final List users; const Search({ - this.type_, + this.type, this.comments, this.posts, this.communities, diff --git a/lib/client/models/search.g.dart b/lib/client/models/search.g.dart index f0b41fe..8e62a57 100644 --- a/lib/client/models/search.g.dart +++ b/lib/client/models/search.g.dart @@ -8,7 +8,7 @@ part of 'search.dart'; Search _$SearchFromJson(Map json) { return Search( - type_: json['type_'] as String, + type: json['type_'] as String, comments: (json['comments'] as List) ?.map((e) => e == null ? null : CommentView.fromJson(e as Map))