Login to different instance

Still needs config variable and frontend option

FossilOrigin-Name: f4d86db71043191548edc8b23c496eaa1f5a44f464a033f2d722439c0807f3f1
This commit is contained in:
me@ow.nekobit.net 2022-04-04 02:10:18 +00:00
parent dd723758c4
commit 2552e13068
3 changed files with 7 additions and 2 deletions

View file

@ -66,7 +66,10 @@ int main(void)
char* get_str = read_query_data(&(ssn.query));
mastodont_t api;
api.url = config_instance_url;
if (ssn.post.instance_url)
api.url = ssn.post.instance_url;
else
api.url = config_instance_url;
mastodont_init(&api, MSTDNT_FLAG_NO_URI_SANITIZE | config_library_flags);
api.token = ssn.cookies.access_token; // Load token now

View file

@ -87,7 +87,7 @@ char* read_post_data(struct query_values* post)
{ "min_id", &(post->min_id) },
{ "max_id", &(post->max_id) },
{ "start_id", &(post->start_id) },
{ "instance_url", &(post->start_id) },
};
// END Query references

View file

@ -45,6 +45,8 @@ struct query_values
char* min_id;
char* max_id;
char* start_id;
char* instance_url;
};
struct get_values