fix daphne deployment
This commit is contained in:
@@ -29,12 +29,15 @@ class SimpleUser {
|
||||
});
|
||||
|
||||
factory SimpleUser.fromJson(Map<String, dynamic> json) {
|
||||
String? imagePath = json["image"] as String?;
|
||||
String? imageUrl = imagePath != null ? "$baseURL/media/$imagePath" : null;
|
||||
|
||||
return SimpleUser(
|
||||
id: json["id"] as int,
|
||||
username: json["username"] as String,
|
||||
firstName: json["first_name"] as String,
|
||||
lastName: json["last_name"] as String,
|
||||
imageUrl: json["image"] as String?,
|
||||
imageUrl: imageUrl,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user