Merged in feat/sw-1948-point-transfer-endpoint (pull request #2353)

feat(SW-1948):Add SAS point transfer endpoint

* Add SAS point transfer endpoint


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-06-12 14:06:30 +00:00
parent a93cdf007f
commit 7a3ab92426
6 changed files with 67 additions and 25 deletions

View File

@@ -262,15 +262,22 @@ async function handleTransferPoints({
})
)
if (!res || error) {
if (!res || error || res.transferState === "error") {
console.error("[SAS] transfer points error", error)
return {
// TODO better errors?
url: `/${lang}/sas-x-scandic/error`,
type: "replace",
}
}
if (res.transferState === "notLinked") {
console.warn("[SAS] transfer points not linked")
return {
url: `/${lang}/sas-x-scandic/link`,
type: "replace",
}
}
console.log("[SAS] transfer points response", res)
return {