Fix application creation to POST

FossilOrigin-Name: 81075edfe438adb0f21e412a92713fd5a12f236925a49b5e1ac8fa78785c382d
This commit is contained in:
me@ow.nekobit.net 2022-02-21 16:06:40 +00:00
parent 024a584f16
commit 9b27519f65
2 changed files with 10 additions and 3 deletions

View file

@ -123,7 +123,14 @@ int mastodont_account_statuses(mastodont_t* data,
struct mstdnt_storage* storage,
struct mstdnt_status* statuses[],
size_t* size);
int mastodont_status_content(mastodont_t* data,
char* id,
struct mstdnt_storage* storage,
struct mstdnt_status* statuses_before[],
struct mstdnt_status* statuses_after[],
size_t* size_before,
size_t* size_after);
int mastodont_create_status(mastodont_t* data,
struct mstdnt_create_status_args* args,
struct mstdnt_storage* storage);

View file

@ -115,7 +115,7 @@ int mastodont_register_app(mastodont_t* data,
curl_easy_setopt(data->curl, CURLOPT_POSTFIELDS, post);
if (mastodont_fetch_curl(data, "api/v1/apps", &results, CURLOPT_HTTPGET) != CURLE_OK)
if (mastodont_fetch_curl(data, "api/v1/apps", &results, CURLOPT_POST) != CURLE_OK)
{
res = 1;
goto cleanup;
@ -183,7 +183,7 @@ int mastodont_obtain_oauth_token(mastodont_t* data,
curl_easy_setopt(data->curl, CURLOPT_POSTFIELDS, post);
if (mastodont_fetch_curl(data, "oauth/token", &results, CURLOPT_HTTPGET) != CURLE_OK)
if (mastodont_fetch_curl(data, "oauth/token", &results, CURLOPT_POST) != CURLE_OK)
{
res = 1;
goto cleanup;