mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-08 18:03:12 +00:00
NaiJi
bad6926567
- Rename APIGenericResult to GenericResult - Wrap all provider functions results with GenericResult - Move basic server commands and getters to business logic layer from API on Hetzner
16 lines
340 B
Dart
16 lines
340 B
Dart
class GenericResult<T> {
|
|
GenericResult({
|
|
required this.success,
|
|
required this.data,
|
|
this.message,
|
|
this.code,
|
|
});
|
|
|
|
/// Whether was a response successfully received,
|
|
/// doesn't represent success of the request if `data<T>` is `bool`
|
|
final bool success;
|
|
final String? message;
|
|
final T data;
|
|
final int? code;
|
|
}
|