diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 22 |
1 files changed, 1 insertions, 21 deletions
| @@ -3334,27 +3334,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 3334 | snac.config = xs_dict_set(snac.config, "passwd", pw); | 3334 | snac.config = xs_dict_set(snac.config, "passwd", pw); |
| 3335 | } | 3335 | } |
| 3336 | 3336 | ||
| 3337 | xs *fn = xs_fmt("%s/user.json", snac.basedir); | 3337 | user_persist(&snac); |
| 3338 | xs *bfn = xs_fmt("%s.bak", fn); | ||
| 3339 | FILE *f; | ||
| 3340 | |||
| 3341 | rename(fn, bfn); | ||
| 3342 | |||
| 3343 | if ((f = fopen(fn, "w")) != NULL) { | ||
| 3344 | xs_json_dump(snac.config, 4, f); | ||
| 3345 | fclose(f); | ||
| 3346 | } | ||
| 3347 | else | ||
| 3348 | rename(bfn, fn); | ||
| 3349 | |||
| 3350 | history_del(&snac, "timeline.html_"); | ||
| 3351 | |||
| 3352 | xs *a_msg = msg_actor(&snac); | ||
| 3353 | xs *u_msg = msg_update(&snac, a_msg); | ||
| 3354 | |||
| 3355 | enqueue_message(&snac, u_msg); | ||
| 3356 | |||
| 3357 | enqueue_verify_links(&snac); | ||
| 3358 | 3338 | ||
| 3359 | status = HTTP_STATUS_SEE_OTHER; | 3339 | status = HTTP_STATUS_SEE_OTHER; |
| 3360 | } | 3340 | } |