diff options
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -1290,6 +1290,19 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 1290 | else | 1290 | else |
| 1291 | status = 401; | 1291 | status = 401; |
| 1292 | } | 1292 | } |
| 1293 | else | ||
| 1294 | if (strcmp(cmd, "/notifications/clear") == 0) { | ||
| 1295 | if (logged_in) { | ||
| 1296 | notify_clear(&snac); | ||
| 1297 | timeline_touch(&snac); | ||
| 1298 | |||
| 1299 | *body = xs_dup("{}"); | ||
| 1300 | *ctype = "application/json"; | ||
| 1301 | status = 200; | ||
| 1302 | } | ||
| 1303 | else | ||
| 1304 | status = 401; | ||
| 1305 | } | ||
| 1293 | 1306 | ||
| 1294 | /* user cleanup */ | 1307 | /* user cleanup */ |
| 1295 | if (logged_in) | 1308 | if (logged_in) |