forked from firka/student-legacy
Removed " " from login
This commit is contained in:
parent
3857896d6c
commit
e255182b93
@ -57,15 +57,13 @@ Future loginApi({
|
||||
String nonceStr = await Provider.of<KretaClient>(context, listen: false)
|
||||
.getAPI(KretaAPI.nonce, json: false);
|
||||
|
||||
Nonce nonce =
|
||||
getNonce(nonceStr, '${username.replaceAll(' ', '')} ', instituteCode);
|
||||
headers.addAll(nonce.header());
|
||||
Nonce nonce = getNonce(nonceStr, username, instituteCode);
|
||||
|
||||
Map? res = await Provider.of<KretaClient>(context, listen: false)
|
||||
.postAPI(KretaAPI.login,
|
||||
headers: headers,
|
||||
body: User.loginBody(
|
||||
username: '${username.replaceAll(' ', '')} ',
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: instituteCode,
|
||||
));
|
||||
@ -84,7 +82,7 @@ Future loginApi({
|
||||
.getAPI(KretaAPI.student(instituteCode));
|
||||
Student student = Student.fromJson(studentJson!);
|
||||
var user = User(
|
||||
username: '${username.replaceAll(' ', '')} ',
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: instituteCode,
|
||||
name: student.name,
|
||||
|
@ -169,7 +169,7 @@ class KretaClient {
|
||||
Map? loginRes = await postAPI(KretaAPI.login,
|
||||
headers: headers,
|
||||
body: User.loginBody(
|
||||
username: loginUser.username.replaceAll(' ', '') + ' ',
|
||||
username: loginUser.username,
|
||||
password: loginUser.password,
|
||||
instituteCode: loginUser.instituteCode,
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user