updated project style guidelines
This commit is contained in:
@ -15,7 +15,5 @@ class AddFeedback extends MhslApi<void> {
|
||||
void assemble(String raw) {}
|
||||
|
||||
@override
|
||||
Future<Response>? request(Uri uri) {
|
||||
return http.post(uri, body: jsonEncode(params.toJson()));
|
||||
}
|
||||
}
|
||||
Future<Response>? request(Uri uri) => http.post(uri, body: jsonEncode(params.toJson()));
|
||||
}
|
||||
|
@ -19,4 +19,4 @@ class AddFeedbackParams {
|
||||
|
||||
factory AddFeedbackParams.fromJson(Map<String, dynamic> json) => _$AddFeedbackParamsFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$AddFeedbackParamsToJson(this);
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,4 @@ class UpdateUserIndexParams {
|
||||
|
||||
factory UpdateUserIndexParams.fromJson(Map<String, dynamic> json) => _$UpdateUserIndexParamsFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$UpdateUserIndexParamsToJson(this);
|
||||
}
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ class UpdateUserIndex extends MhslApi<void> {
|
||||
|
||||
@override
|
||||
Future<http.Response> request(Uri uri) {
|
||||
String data = jsonEncode(params.toJson());
|
||||
var data = jsonEncode(params.toJson());
|
||||
log('Updating userindex:\n $data');
|
||||
return http.post(uri, body: data);
|
||||
}
|
||||
|
||||
static void index() async {
|
||||
static Future<void> index() async {
|
||||
UpdateUserIndex(
|
||||
UpdateUserIndexParams(
|
||||
username: AccountData().getUsername(),
|
||||
@ -35,4 +35,4 @@ class UpdateUserIndex extends MhslApi<void> {
|
||||
),
|
||||
).run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user