From 178348f43a8dae77a26fbc6b45b5861c7ef66434 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 7 Apr 2021 15:01:21 -0700 Subject: [PATCH] fix issue where project query didn't include donation settings --- docker/deployment/hangar-backend/application.yml | 7 +++++++ docker/hangar/application.yml | 8 ++++++++ .../papermc/hangar/db/dao/v1/ProjectsApiDAO.java | 14 ++++++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docker/deployment/hangar-backend/application.yml b/docker/deployment/hangar-backend/application.yml index cf71ea03..5b9334b5 100644 --- a/docker/deployment/hangar-backend/application.yml +++ b/docker/deployment/hangar-backend/application.yml @@ -17,6 +17,13 @@ hangar: base-url: "https://hangar.benndorf.dev" plugin-upload-dir: "/hangar/uploads" + licences: + - "MIT" + - "Apache 2.0" + - "GPL" + - "LPGL" + - "(custom)" + announcements: - text: "This is a staging server for testing purposes. Data could be deleted at any time. email confirmations are disabled. If you wanna help test, sneak into #hangar-dev" diff --git a/docker/hangar/application.yml b/docker/hangar/application.yml index fc34aa79..b3fe68d9 100644 --- a/docker/hangar/application.yml +++ b/docker/hangar/application.yml @@ -42,6 +42,14 @@ hangar: auth-url: "http://localhost:8000" base-url: "http://localhost:3000" plugin-upload-dir: "/uploads" + ga-code: "UA-38006759-9" + + licences: + - "MIT" + - "Apache 2.0" + - "GPL" + - "LPGL" + - "(custom)" sponsors: - name: Beer diff --git a/src/main/java/io/papermc/hangar/db/dao/v1/ProjectsApiDAO.java b/src/main/java/io/papermc/hangar/db/dao/v1/ProjectsApiDAO.java index a88e83e0..6cde84af 100644 --- a/src/main/java/io/papermc/hangar/db/dao/v1/ProjectsApiDAO.java +++ b/src/main/java/io/papermc/hangar/db/dao/v1/ProjectsApiDAO.java @@ -53,7 +53,12 @@ public interface ProjectsApiDAO { " p.license_name," + " p.license_url," + " p.keywords," + - " p.forum_sync" + + " p.forum_sync," + + " p.donation_enabled," + + " p.donation_email," + + " p.donation_default_amount," + + " p.donation_onetime_amounts," + + " p.donation_monthly_amounts" + " FROM home_projects hp" + " JOIN projects p ON hp.id = p.id" + " WHERE lower(hp.slug) = lower(:slug) AND" + @@ -88,7 +93,12 @@ public interface ProjectsApiDAO { " p.license_name," + " p.license_url," + " p.keywords," + - " p.forum_sync" + + " p.forum_sync," + + " p.donation_enabled," + + " p.donation_email," + + " p.donation_default_amount," + + " p.donation_onetime_amounts," + + " p.donation_monthly_amounts" + " FROM home_projects hp" + " JOIN projects p ON hp.id = p.id" + " WHERE true " + // Not sure how else to get here a single Where