From 675f3962af281c36a61bd56906dd11e9693e9c84 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Tue, 19 Nov 2024 00:05:32 +0100 Subject: [PATCH] wip: 2024-11-18T16:41:08+0100 (1731944468) --- api/.env.example.ini | 9 +++++++- api/endpoints/about/languages/GET.php | 29 ++++++++++++++++++++++++++ api/endpoints/about/languages/POST.php | 13 ++++++++++++ api/src/Endpoints.php | 2 ++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 api/endpoints/about/languages/GET.php create mode 100644 api/endpoints/about/languages/POST.php diff --git a/api/.env.example.ini b/api/.env.example.ini index 163a056..265d5ce 100755 --- a/api/.env.example.ini +++ b/api/.env.example.ini @@ -5,4 +5,11 @@ pass = "" [databases] vlw = "" -battlestation = "" \ No newline at end of file +battlestation = "" + +; Forgejo language chart endpoints config +[about_languages] +; CSV of Forgejo profiles to include public source repositories from +scan_profiles = "" +; Path to a JSON file to store cached language endpoint responses +cache_file = "" \ No newline at end of file diff --git a/api/endpoints/about/languages/GET.php b/api/endpoints/about/languages/GET.php new file mode 100644 index 0000000..e25ab54 --- /dev/null +++ b/api/endpoints/about/languages/GET.php @@ -0,0 +1,29 @@ +value))->post(["FUCK YOU"]); + // Return 404 Not Found if response array is empty + return self::cache_exists() + ? new Response(self::load_cache()) + : $bitch; + } + } \ No newline at end of file diff --git a/api/endpoints/about/languages/POST.php b/api/endpoints/about/languages/POST.php new file mode 100644 index 0000000..43c0b71 --- /dev/null +++ b/api/endpoints/about/languages/POST.php @@ -0,0 +1,13 @@ +