diff options
author | default <nobody@localhost> | 2022-11-23 16:59:35 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2022-11-23 16:59:35 +0100 |
commit | fa3904c5a7a4b4f75446b30b107467ae5f1ed6ee (patch) | |
tree | ee7b2e69d7ed56201e66df25ac92737efb36fda0 | |
parent | 39a9afb7c2151d84cef4da96f0d9f72f442662c6 (diff) |
New function object_del().
-rw-r--r-- | data.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -273,6 +273,21 @@ int object_add(const char *id, d_char *obj) } +int object_del(const char *id) +/* deletes an object */ +{ + int status = 404; + xs *fn = _object_fn_by_id(id); + + if (fn != NULL && unlink(fn) != -1) + status = 200; + + srv_debug(2, xs_fmt("object_del %s %d", id, status)); + + return status; +} + + d_char *_follower_fn(snac *snac, char *actor) { xs *md5 = xs_md5_hex(actor, strlen(actor)); |