soprafixes

This commit is contained in:
Simon Schwarz 2022-11-14 23:31:30 +01:00
parent c25d746ecb
commit 21faf7b043
2 changed files with 3 additions and 2 deletions

View File

@ -58,6 +58,7 @@ export const PartyPage: React.FC = () => {
} else if (party.definitely_coming === 0) {
coming = `Bisher haben ${party.maybe_coming} Gäste vorläufig zugesagt.`
} else {
// eslint-disable-next-line
coming = `Nach den bisherigen Zusagen kommen ${party.definitely_coming} bis ${party.definitely_coming + party.maybe_coming} Gäste.`
}
}

View File

@ -2,7 +2,7 @@ import { APIEndPoint, PartyStatus, SelfStatus, UpdatableSelfStatus } from "./Par
export const parseURI = (uri: string): APIEndPoint | undefined => {
// const x = uri.match(/https?:\/\/(?<partyName>.+)\.party\.leafbla\.de\/(?<token>.+)/);
const x = uri.match(/https?:\/\/[^\/]+\/(?<token>.+)/);
const x = uri.match(/https?:\/\/[^/]+\/(?<token>.+)/);
if (x === null || x.groups === undefined) return;
// const partyName = x.groups["partyName"];
const partyName = "xmas";
@ -12,7 +12,7 @@ export const parseURI = (uri: string): APIEndPoint | undefined => {
};
const apiUrl = (apiEndPoint : APIEndPoint): string => {
let a = `https://party.leafbla.de/api/${apiEndPoint.partyName}/${apiEndPoint.token}`;
console.log(a);
return a;