Login add " ", Comment rename

This commit is contained in:
Tihanyi Marcell
2023-06-08 13:47:40 +02:00
parent 87b8cbb60f
commit da06e400e1
3 changed files with 5 additions and 5 deletions

View File

@@ -57,14 +57,14 @@ Future loginApi({
String nonceStr = await Provider.of<KretaClient>(context, listen: false)
.getAPI(KretaAPI.nonce, json: false);
Nonce nonce = getNonce(nonceStr, username, instituteCode);
Nonce nonce = getNonce(nonceStr, username.replaceAll(' ', '') + ' ', instituteCode);
headers.addAll(nonce.header());
Map? res = await Provider.of<KretaClient>(context, listen: false)
.postAPI(KretaAPI.login,
headers: headers,
body: User.loginBody(
username: username,
username: username.replaceAll(' ', '') + ' ',
password: password,
instituteCode: instituteCode,
));
@@ -83,7 +83,7 @@ Future loginApi({
.getAPI(KretaAPI.student(instituteCode));
Student student = Student.fromJson(studentJson!);
var user = User(
username: username,
username: username.replaceAll(' ', '') + ' ',
password: password,
instituteCode: instituteCode,
name: student.name,