Slon/Api/V1/Accounts: Allow updating avatar/header images via PATCH /api/v1/accounts/update_credentials
This commit is contained in:
parent
3100707e78
commit
b8fba64ab0
3 changed files with 54 additions and 60 deletions
|
@ -6,6 +6,8 @@ extern @http_response* @slon_activitypub_signed_request(U8* url_string, U8* fetc
|
|||
class SlonCatboxUpload {
|
||||
JsonKey* key;
|
||||
U8* filepath;
|
||||
U0 (*callback)(U64 arg = NULL);
|
||||
U64 callback_arg;
|
||||
};
|
||||
|
||||
Bool @slon_api_authorized(SlonHttpSession* session)
|
||||
|
@ -215,6 +217,9 @@ U0 @slon_api_async_upload_to_catbox(SlonCatboxUpload* cb)
|
|||
|
||||
cb->key->value = StrNew(url_ptr, adam_task);
|
||||
cb->key->type = JSON_STRING;
|
||||
if (cb->callback) {
|
||||
cb->callback(cb->callback_arg);
|
||||
}
|
||||
|
||||
slon_api_upload_to_catbox_failed:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue