summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-08-29 08:30:09 +0200
committerdefault <nobody@localhost>2024-08-29 08:30:09 +0200
commit08de4913955c6a4a31c13f72fbce2601bed215ba (patch)
tree27192a33496fcccefe86cd49b620169c00bf9926 /data.c
parent54520f0411658ae37d6115d69c056dd1af3b7fb9 (diff)
mastoapi: added bookmark list.
Diffstat (limited to 'data.c')
-rw-r--r--data.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/data.c b/data.c
index 8345001..453bdd6 100644
--- a/data.c
+++ b/data.c
@@ -1026,12 +1026,18 @@ xs_str *object_user_cache_fn(snac *user, const char *id, const char *cachedir)
}
+xs_str *object_user_cache_index_fn(snac *user, const char *cachedir)
+{
+ return xs_fmt("%s/%s.idx", user->basedir, cachedir);
+}
+
+
int _object_user_cache(snac *user, const char *id, const char *cachedir, int del)
/* adds or deletes from a user cache */
{
xs *ofn = _object_fn(id);
xs *cfn = object_user_cache_fn(user, id, cachedir);
- xs *idx = xs_fmt("%s/%s.idx", user->basedir, cachedir);
+ xs *idx = object_user_cache_index_fn(user, cachedir);
int ret;
if (del) {
@@ -1590,6 +1596,12 @@ xs_list *bookmark_list(snac *user)
}
+xs_str *bookmark_index_fn(snac *user)
+{
+ return object_user_cache_index_fn(user, "bookmark");
+}
+
+
/** pinning **/
int is_pinned(snac *user, const char *id)