Write URL to JSON file into entries.
This commit is contained in:
parent
f48ad494b5
commit
d8212c261f
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of FediBlock-backend.
|
||||
* Copyright © 2020 tastytea <tastytea@tastytea.de>
|
||||
* Copyright © 2020, 2021 tastytea <tastytea@tastytea.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
#include "files.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
#include "fs-compat.hpp"
|
||||
#include "json.hpp"
|
||||
#include "types.hpp"
|
||||
|
@ -152,6 +153,8 @@ string get_access_token()
|
|||
|
||||
vector<entry_type> read_json_files(const bool cache)
|
||||
{
|
||||
using namespace FediBlock::config;
|
||||
|
||||
vector<entry_type> entries;
|
||||
|
||||
// clang-format off
|
||||
|
@ -210,6 +213,10 @@ vector<entry_type> read_json_files(const bool cache)
|
|||
}
|
||||
}
|
||||
}
|
||||
entry.json_url = format("https://{:s}/{:s}/{:s}/raw/branch/{:s}/{:s}",
|
||||
forge_domain, forge_org, forge_repo_data,
|
||||
forge_repo_data_branch,
|
||||
path.filename().string());
|
||||
entries.push_back(entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of FediBlock-backend.
|
||||
* Copyright © 2020 tastytea <tastytea@tastytea.de>
|
||||
* Copyright © 2020, 2021 tastytea <tastytea@tastytea.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
|
@ -34,6 +34,7 @@ struct entry_type
|
|||
string description;
|
||||
vector<string> screenshot_filepaths;
|
||||
string report_time;
|
||||
string json_url;
|
||||
};
|
||||
|
||||
enum class http_method
|
||||
|
|
Reference in New Issue