Fixed a bug on the server's side where the access token was not being read correctly from a file and adding a newline.
This commit is contained in:
parent
74f7766135
commit
755485c102
@ -399,10 +399,12 @@ pub mod info_app {
|
||||
|
||||
#[server]
|
||||
async fn get_account_avatars() -> Result<Vec<Testimonial>, ServerFnError> {
|
||||
let mut access_token = tokio::fs::read_to_string("access_token.key").await?;
|
||||
access_token = access_token.trim().to_string();
|
||||
let client = megalodon::generator(
|
||||
megalodon::SNS::Mastodon,
|
||||
String::from("https://yiff.life"),
|
||||
Some(tokio::fs::read_to_string("access_token.key").await?),
|
||||
Some(access_token),
|
||||
None,
|
||||
);
|
||||
let testimonial_toml: String = tokio::fs::read_to_string("data/testimonials.toml").await?;
|
||||
|
Loading…
Reference in New Issue
Block a user