<commit_before>use crate::util::{json_response, EndpointResult};

pub(crate) mod pagination;

pub(crate) use self::pagination::Paginate;

pub fn ok_true() -> EndpointResult {
    #[derive(Serialize)]
    struct R {
        ok: bool,
    }

    Ok(json_response(&R { ok: true }))
}<commit_msg>controllers::helpers: Use `json!` macro to simplify JSON serialization code<commit_after>use crate::util::{json_response, EndpointResult};

pub(crate) mod pagination;

pub(crate) use self::pagination::Paginate;

pub fn ok_true() -> EndpointResult {
    let json = json!({ "ok": true });
    Ok(json_response(&json))
}
{'fraction_non_alphanumeric': 0.1510673234811166, 'fraction_numerical': 0.0, 'mean_word_length': 5.1, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5494816', 'n_tokens_mistral': 200, 'n_tokens_neox': 208, 'n_words': 48}