diff options
author | grunfink <grunfink@noreply.codeberg.org> | 2024-05-30 08:44:54 +0000 |
---|---|---|
committer | grunfink <grunfink@noreply.codeberg.org> | 2024-05-30 08:44:54 +0000 |
commit | d56d4beb90f613b82ebf705a3e81a667b9601860 (patch) | |
tree | 5998501d0ea9a09f26db65e2d29fcb0927b5eee0 /snac.c | |
parent | 5bc2017ba065337dd15aa280ca0a43855b7b507b (diff) | |
parent | af8f1ef273e457318cb48f198e73c59e57373723 (diff) |
Merge pull request 'Mastodon PATCH API for user profile updates' (#169) from louis77/snac2:master into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/169
Diffstat (limited to 'snac.c')
-rw-r--r-- | snac.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -170,3 +170,15 @@ int check_password(const char *uid, const char *passwd, const char *hash) return ret; } + + +const char *http_status_text(int status) +/* translate status codes to canonical status texts */ +{ + switch (status) { +#define HTTP_STATUS(code, name, text) case HTTP_STATUS_ ## name: return #text; +#include "http_codes.h" +#undef HTTP_STATUS + default: return "Unknown"; + } +} |