chore: fix all problems
continuous-integration/drone/push Build is passing

This commit was merged in pull request #159.
This commit is contained in:
2023-02-24 10:12:04 +01:00
parent 8d833d39d7
commit 25cf9518f9
11 changed files with 40 additions and 40 deletions
@@ -66,7 +66,7 @@ Future<void> handleDigest(HttpRequest req) async {
Future<void> handleUnsafe(HttpRequest req) async {
print(
'Query parameters => '
'${req.uri.queryParameters.toString()}',
'${req.uri.queryParameters}',
);
}
@@ -82,8 +82,8 @@ class VerifyCode {
VerifyCode.fromMap(json.decode(source) as Map<String, dynamic>);
@override
String toString() =>
'VerifyCode(email: $email, verificationCode: $verificationCode, action: $action)';
String toString() => 'VerifyCode(email: $email, verificationCode: '
'$verificationCode, action: $action)';
}
class Account {
@@ -198,8 +198,8 @@ class TokenSuccess {
TokenSuccess.fromMap(json.decode(source) as Map<String, dynamic>);
@override
String toString() =>
'TokenSuccess(accessToken: $accessToken, refreshToken: $refreshToken, account: $account)';
String toString() => 'TokenSuccess(accessToken: $accessToken, refreshToken: '
'$refreshToken, account: $account)';
}
class Login {
@@ -353,19 +353,19 @@ void main(List<String> args) async {
);
await api.sendSignUpCode('git@pcl.ovh');
final verifiedAccount = await api.verifyCode(
VerifyCode(
email: 'git@pcl.ovh',
verificationCode: '000000000',
action: EmailVerificationAction.signUp,
),
);
final registeredAccount = await api.signUp(
SignUp(sessionId: verifiedAccount.sessionId ?? '', password: 'password'),
);
final signedInAccount = await api.signInWithPassword(
Login(email: 'git@pcl.ovh', password: 'password'),
);
// final verifiedAccount = await api.verifyCode(
// VerifyCode(
// email: 'git@pcl.ovh',
// verificationCode: '000000000',
// action: EmailVerificationAction.signUp,
// ),
// );
// final registeredAccount = await api.signUp(
// SignUp(sessionId: verifiedAccount.sessionId ?? '', password: 'password'),
// );
// final signedInAccount = await api.signInWithPassword(
// Login(email: 'git@pcl.ovh', password: 'password'),
// );
final accountList = await api.getAccountList();
print(accountList);
}
@@ -45,7 +45,8 @@ import 'package:wyatt_http_client/src/utils/protocols.dart';
// BaseResponse onResponse(BaseResponse response) {
// final res = child?.onResponse(response) ?? response;
// print(
// 'RequestMutator::OnResponse: ${res.statusCode} -> ${res.contentLength} bytes',
// 'RequestMutator::OnResponse: ${res.statusCode} -> ${res.contentLength}
// bytes',
// );
// return res;
// }
@@ -75,7 +76,8 @@ import 'package:wyatt_http_client/src/utils/protocols.dart';
// if (response != null) return response;
// return Future.sync(() => innerHandler(request))
// .then((response) => responseHandler!(response), onError: onError);
// .then((response) => responseHandler!(response), onError:
// onError);
// });
// };
// };
@@ -30,6 +30,8 @@ class Pipeline {
/// Add a [Middleware] to this [Pipeline]
Pipeline addMiddleware(Middleware middleware) {
_middlewares.add(middleware);
// TODO(hpcl): use Dart cascades instead of returning this
// ignore: avoid_returning_this
return this;
}