fix
This commit is contained in:
parent
3a19a207f3
commit
533ea62492
@ -540,10 +540,12 @@ pub fn w_refresh(res: &str) {
|
|||||||
let mut f = fs::File::create(f.clone()).unwrap();
|
let mut f = fs::File::create(f.clone()).unwrap();
|
||||||
let mut ff = fs::File::create(ff.clone()).unwrap();
|
let mut ff = fs::File::create(ff.clone()).unwrap();
|
||||||
f.write_all(&res.as_bytes()).unwrap();
|
f.write_all(&res.as_bytes()).unwrap();
|
||||||
let json: Token = serde_json::from_str(&res).unwrap();
|
let token = data_toml(&"access");
|
||||||
|
let refresh = data_toml(&"refresh");
|
||||||
|
//let json: Token = serde_json::from_str(&res).unwrap();
|
||||||
let refreshs = Refresh {
|
let refreshs = Refresh {
|
||||||
access: json.accessJwt.to_string(),
|
access: token.to_string(),
|
||||||
refresh: json.refreshJwt.to_string(),
|
refresh: refresh.to_string(),
|
||||||
};
|
};
|
||||||
let toml = toml::to_string(&refreshs).unwrap();
|
let toml = toml::to_string(&refreshs).unwrap();
|
||||||
ff.write_all(&toml.as_bytes()).unwrap();
|
ff.write_all(&toml.as_bytes()).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user