refactor: run formatter

This commit is contained in:
Elias Schneider
2024-10-23 15:48:55 +02:00
parent acbff6e129
commit 446f9dd209
3 changed files with 12 additions and 9 deletions

View File

@@ -274,7 +274,10 @@ export class AuthService {
URL.canParse(configuration.end_session_endpoint) URL.canParse(configuration.end_session_endpoint)
) { ) {
const redirectURI = new URL(configuration.end_session_endpoint); const redirectURI = new URL(configuration.end_session_endpoint);
redirectURI.searchParams.append("post_logout_redirect_uri", this.config.get("general.appUrl")); redirectURI.searchParams.append(
"post_logout_redirect_uri",
this.config.get("general.appUrl"),
);
redirectURI.searchParams.append("id_token_hint", idTokenHint); redirectURI.searchParams.append("id_token_hint", idTokenHint);
redirectURI.searchParams.append( redirectURI.searchParams.append(
"client_id", "client_id",

View File

@@ -43,7 +43,7 @@ function App({ Component, pageProps }: AppProps) {
const [route, setRoute] = useState<string>(pageProps.route); const [route, setRoute] = useState<string>(pageProps.route);
const [configVariables, setConfigVariables] = useState<Config[]>( const [configVariables, setConfigVariables] = useState<Config[]>(
pageProps.configVariables pageProps.configVariables,
); );
useEffect(() => { useEffect(() => {
@@ -53,7 +53,7 @@ function App({ Component, pageProps }: AppProps) {
useEffect(() => { useEffect(() => {
const interval = setInterval( const interval = setInterval(
async () => await authService.refreshAccessToken(), async () => await authService.refreshAccessToken(),
2 * 60 * 1000 // 2 minutes 2 * 60 * 1000, // 2 minutes
); );
return () => clearInterval(interval); return () => clearInterval(interval);
@@ -180,7 +180,7 @@ App.getInitialProps = async ({ ctx }: { ctx: GetServerSidePropsContext }) => {
pageProps.route = ctx.req.url; pageProps.route = ctx.req.url;
const requestLanguage = i18nUtil.getLanguageFromAcceptHeader( const requestLanguage = i18nUtil.getLanguageFromAcceptHeader(
ctx.req.headers["accept-language"] ctx.req.headers["accept-language"],
); );
pageProps.language = ctx.req.cookies["language"] ?? requestLanguage; pageProps.language = ctx.req.cookies["language"] ?? requestLanguage;

View File

@@ -37,7 +37,7 @@ const Share = ({ shareId }: { shareId: string }) => {
modals, modals,
t("share.error.visitor-limit-exceeded.title"), t("share.error.visitor-limit-exceeded.title"),
t("share.error.visitor-limit-exceeded.description"), t("share.error.visitor-limit-exceeded.description"),
"go-home" "go-home",
); );
} else if (error == "share_password_required") { } else if (error == "share_password_required") {
showEnterPasswordModal(modals, getShareToken); showEnterPasswordModal(modals, getShareToken);
@@ -61,21 +61,21 @@ const Share = ({ shareId }: { shareId: string }) => {
modals, modals,
t("share.error.removed.title"), t("share.error.removed.title"),
e.response.data.message, e.response.data.message,
"go-home" "go-home",
); );
} else { } else {
showErrorModal( showErrorModal(
modals, modals,
t("share.error.not-found.title"), t("share.error.not-found.title"),
t("share.error.not-found.description"), t("share.error.not-found.description"),
"go-home" "go-home",
); );
} }
} else if (e.response.status == 403 && error == "private_share") { } else if (e.response.status == 403 && error == "private_share") {
showErrorModal( showErrorModal(
modals, modals,
t("share.error.access-denied.title"), t("share.error.access-denied.title"),
t("share.error.access-denied.description") t("share.error.access-denied.description"),
); );
} else if (error == "share_password_required") { } else if (error == "share_password_required") {
showEnterPasswordModal(modals, getShareToken); showEnterPasswordModal(modals, getShareToken);
@@ -86,7 +86,7 @@ const Share = ({ shareId }: { shareId: string }) => {
modals, modals,
t("common.error"), t("common.error"),
t("common.error.unknown"), t("common.error.unknown"),
"go-home" "go-home",
); );
} }
}); });