diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-08-05 11:58:50 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-08-05 11:59:56 +0200 |
| commit | d35e03f0b07d1af3fecd51cd4ca42a76c300db23 (patch) | |
| tree | 92562e06ade3a2ac30e5ce39b8442d980b2fad08 /src/utils-common.ts | |
| parent | 6c2bffd297bdfaf4e95a8f0620cf0349d3d3bb78 (diff) | |
| download | bycs-sol-d35e03f0b07d1af3fecd51cd4ca42a76c300db23.tar.gz bycs-sol-d35e03f0b07d1af3fecd51cd4ca42a76c300db23.zip | |
format: run prettier
Diffstat (limited to 'src/utils-common.ts')
| -rw-r--r-- | src/utils-common.ts | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/utils-common.ts b/src/utils-common.ts index f3ad944..8053043 100644 --- a/src/utils-common.ts +++ b/src/utils-common.ts @@ -1,8 +1,18 @@ "use strict"; -export const DATE_FMT = new Intl.DateTimeFormat("de-DE", { month: "numeric", day: "numeric", year: "numeric"}); +export const DATE_FMT = new Intl.DateTimeFormat("de-DE", { + month: "numeric", + day: "numeric", + year: "numeric", +}); -export const DATETIME_FMT = new Intl.DateTimeFormat("de-DE", { month: "numeric", day: "numeric", year: "numeric", hour: "numeric", minute: "numeric" }); +export const DATETIME_FMT = new Intl.DateTimeFormat("de-DE", { + month: "numeric", + day: "numeric", + year: "numeric", + hour: "numeric", + minute: "numeric", +}); export function dateStringNow() { return DATE_FMT.format(new Date()); @@ -14,8 +24,8 @@ export function datetimeStringNow() { // TODO(muhq): Cache the retrieved URL export async function getUserIconUrl(userId: number): Promise<string> { - const userRes = await fetch(`https://lernplattform.bycs.de/user/profile.php?id=${userId}`) - const userDoc = new DOMParser().parseFromString(await userRes.text(), 'text/html') + const userRes = await fetch(`https://lernplattform.bycs.de/user/profile.php?id=${userId}`); + const userDoc = new DOMParser().parseFromString(await userRes.text(), "text/html"); const userpicture = userDoc.querySelector(".userpicture"); if (userpicture === null) { return ""; |
