Skip to content

Commit 9c68ece

Browse files
committed
fix: fix exception when posting forms
1 parent d147f16 commit 9c68ece

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/features/authentication/repository/models/user_credential.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class UserCredential with UserCredentialMappable {
8686
final SecurityQuestion? securityQuestion;
8787

8888
/// Method to convert to json.
89-
Map<String, dynamic> toJson() {
89+
Map<String, String> toJson() {
9090
final m = {
9191
'fastloginfield': loginField.toString(),
9292
'username': loginFieldValue,

lib/features/checkin/utils/do_checkin.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ Task<CheckinResult> doCheckin(NetClientProvider netClient, CheckinFeeling feelin
4545
return const CheckinResultFormHashNotFound();
4646
}
4747

48-
final body = {'formhash': formHash, 'qdxq': feeling.toString(), 'qdmode': 1, 'todaysay': message, 'fastreply': 1};
48+
final body = <String, String>{
49+
'formhash': formHash,
50+
'qdxq': feeling.toString(),
51+
'qdmode': '1',
52+
'todaysay': message,
53+
'fastreply': '1',
54+
};
4955

5056
final checkInRespEither = await netClient.postForm(_checkInRequestUrl, data: body).run();
5157
if (checkInRespEither.isLeft()) {

0 commit comments

Comments
 (0)