From 3e64f416ebb27aa4d18d9180425ef0fd20a280b9 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Fri, 29 Apr 2022 03:24:21 +0000 Subject: [PATCH] Fix type oh FossilOrigin-Name: 636f7bf40191ca585a708a4fd0763b7b78b7315ee11e6d4f470880b7d326ee1b --- include/mastodont_search.h | 5 +++-- src/search.c | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/mastodont_search.h b/include/mastodont_search.h index 0a4bcb9..c6f14c1 100644 --- a/include/mastodont_search.h +++ b/include/mastodont_search.h @@ -49,9 +49,10 @@ struct mstdnt_search_results // TODO tags }; -int mastodont_search(mastodont* data, +int mastodont_search(mastodont_t* data, char* query, + struct mstdnt_storage* storage, struct mstdnt_search_args* args, - struct mstdnt_searcH_results* results); + struct mstdnt_search_results* results); #endif /* MASTODONT_SEARCH_H */ diff --git a/src/search.c b/src/search.c index 5a2be6d..6790b06 100644 --- a/src/search.c +++ b/src/search.c @@ -29,7 +29,7 @@ static const char* type_to_string(enum mstdnt_search_type type) } } -int mastodont_search(mastodont* data, +int mastodont_search(mastodont_t* data, char* query, struct mstdnt_storage* storage, struct mstdnt_search_args* args, @@ -39,7 +39,7 @@ int mastodont_search(mastodont* data, { _MSTDNT_QUERY_STRING, "max_id", { .s = args->max_id } }, { _MSTDNT_QUERY_STRING, "min_id", { .s = args->min_id } }, { _MSTDNT_QUERY_STRING, "since_id", { .s = args->since_id } }, - { _MSTDNT_QUERR_STRING, "q", { .s = query } }, + { _MSTDNT_QUERY_STRING, "q", { .s = query } }, { _MSTDNT_QUERY_STRING, "max_id", { .s = args->max_id } }, { _MSTDNT_QUERY_STRING, "type", { .s = type_to_string(args->type) } }, { _MSTDNT_QUERY_INT, "resolve", { .i = args->resolve } }, @@ -52,11 +52,12 @@ int mastodont_search(mastodont* data, struct mastodont_request_args req_args = { storage, "api/v2/search", - params, _mstdnt_arr_len(parma), + params, _mstdnt_arr_len(params), NULL, 0, CURLOPT_HTTPGET, results, - _mstdnt_search_result_callback, + /* _mstdnt_search_result_callback, */ + NULL }; return mastodont_request(data, &req_args);