Merge pull request #453 from bd0n4lds/fix-donation-typo

Fix typo in DonationLinkHelper and rewrote swtich statement
pull/456/head
Tobias Groza 2020-11-02 00:15:04 +01:00 zatwierdzone przez GitHub
commit 564a965810
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -15,16 +15,14 @@ public class DonationLinkHelper {
AMAZON,
}
public static DonationService getDonatoinServiceByLink(String link) throws MalformedURLException {
public static DonationService getDonationServiceByLink(String link) throws MalformedURLException {
URL url = new URL(fixLink(link));
switch (url.getHost()) {
case "www.patreon.com":
return DonationService.PATREON;
case "patreon.com":
return DonationService.PATREON;
case "paypal.me":
return DonationService.PAYPAL;
case "www.paypal.me":
case "paypal.me":
return DonationService.PAYPAL;
default:
return DonationService.NO_DONATION;