mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 08:53:36 +00:00
New function object_del().
This commit is contained in:
parent
39a9afb7c2
commit
fa3904c5a7
1 changed files with 15 additions and 0 deletions
15
data.c
15
data.c
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue