diff options
| author | 2024-05-27 12:24:17 +0200 | |
|---|---|---|
| committer | 2024-05-27 12:24:17 +0200 | |
| commit | 81cf309e4d0ba6c2debccc21ea4f85e1e6245dc5 (patch) | |
| tree | 10528a18c859964fa11eabe15955c85dce7ecf25 /httpd.c | |
| parent | Use enum instead of numeric status codes for HTTP statuses (diff) | |
| download | snac2-81cf309e4d0ba6c2debccc21ea4f85e1e6245dc5.tar.gz snac2-81cf309e4d0ba6c2debccc21ea4f85e1e6245dc5.tar.xz snac2-81cf309e4d0ba6c2debccc21ea4f85e1e6245dc5.zip | |
Implement Mastodon PATCH endpoint for account profile updates
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -362,6 +362,16 @@ void httpd_connection(FILE *f) | |||
| 362 | 362 | ||
| 363 | } | 363 | } |
| 364 | else | 364 | else |
| 365 | if (strcmp(method, "PATCH") == 0) { | ||
| 366 | |||
| 367 | #ifndef NO_MASTODON_API | ||
| 368 | if (status == 0) | ||
| 369 | status = mastoapi_patch_handler(req, q_path, | ||
| 370 | payload, p_size, &body, &b_size, &ctype); | ||
| 371 | #endif | ||
| 372 | |||
| 373 | } | ||
| 374 | else | ||
| 365 | if (strcmp(method, "OPTIONS") == 0) { | 375 | if (strcmp(method, "OPTIONS") == 0) { |
| 366 | status = HTTP_STATUS_OK; | 376 | status = HTTP_STATUS_OK; |
| 367 | } | 377 | } |