-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oma endpoint yhteystietojen hakemiseen
- Loading branch information
Showing
5 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ | |
(defn- contact-email [lasku] | ||
(case (or (get-in lasku [:metadata :order-id-prefix]) | ||
(:origin lasku)) | ||
"kkhakemusmaksu" "hakemusmaksut@oph.fi" | ||
"kkhakemusmaksu" "applicationfee@oph.fi" | ||
"OTR" "[email protected]" | ||
"AKR" "[email protected]" | ||
"[email protected]")) | ||
|
@@ -158,10 +158,14 @@ | |
(if all-passed? | ||
(do | ||
(log/warn (str "Kaikki laskut vanhentuneet, laskut: " laskut)) | ||
{:laskut [] | ||
:contact (contact-email (first laskut))}) | ||
{:laskut (map Lasku->json laskut)})) | ||
[]) | ||
(map Lasku->json laskut))) | ||
(do (log/error (str "Linkki on väärä tai vanhentunut: " secret)) | ||
(maksut-error :invoice-notfound-secret (str "Linkki on väärä tai vanhentunut: " secret) {:status-code 404}))))) | ||
(maksut-error :invoice-notfound-secret (str "Linkki on väärä tai vanhentunut: " secret) {:status-code 404})))) | ||
|
||
(get-lasku-contact [_ _ secret] | ||
(if-let [laskut (seq (maksut-queries/get-laskut-by-secret db secret))] | ||
{:contact (contact-email (first laskut))} | ||
(maksut-error :invoice-notfound-secret (str "Linkki on väärä tai vanhentunut: " secret) {:status-code 404})))) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters