Updating angular to the v12

This commit is contained in:
Zoe Roux 2021-08-27 16:59:07 +02:00
commit ef7b22523d
2 changed files with 6 additions and 6 deletions

View File

@ -51,19 +51,19 @@ import { UnauthorizedComponent } from "./unauthorized/unauthorized.component";
OidcModule.forRoot({ OidcModule.forRoot({
config: { config: {
authority: window.location.origin, authority: window.location.origin,
redirectUrl: "/", redirectUrl: `${window.location.origin}/`,
postLogoutRedirectUri: "/logout", postLogoutRedirectUri: `${window.location.origin}/logout`,
clientId: "kyoo.webapp", clientId: "kyoo.webapp",
responseType: "code", responseType: "code",
triggerAuthorizationResultEvent: false, triggerAuthorizationResultEvent: false,
scope: "openid profile offline_access kyoo.read kyoo.write kyoo.play kyoo.admin", scope: "openid profile offline_access kyoo.read kyoo.write kyoo.play kyoo.admin",
silentRenew: true, silentRenew: true,
silentRenewUrl: "/silent.html", silentRenewUrl: `${window.location.origin}/silent.html`,
useRefreshToken: true, useRefreshToken: true,
startCheckSession: true, startCheckSession: true,
forbiddenRoute: "/forbidden", forbiddenRoute: `${window.location.origin}/forbidden`,
unauthorizedRoute: "/unauthorized", unauthorizedRoute: `${window.location.origin}/unauthorized`,
logLevel: LogLevel.Warn logLevel: LogLevel.Warn
} }
}), }),

View File

@ -26,7 +26,7 @@ export class ItemsUtils
if (!("startAir" in item)) if (!("startAir" in item))
return ""; return "";
if (item.endAir && item.startAir !== item.endAir) if (item.endAir && item.startAir?.getFullYear() !== item.endAir.getFullYear())
return `${item.startAir.getFullYear()} - ${item.endAir.getFullYear()}`; return `${item.startAir.getFullYear()} - ${item.endAir.getFullYear()}`;
return item.startAir?.getFullYear().toString(); return item.startAir?.getFullYear().toString();
} }