diff --git a/app/main.py b/app/main.py index dc1cb02..828152b 100644 --- a/app/main.py +++ b/app/main.py @@ -15,6 +15,8 @@ from fastapi import FastAPI from fastapi.requests import Request from jose import jws, jwk, jwt, JWTError from jose.constants import ALGORITHMS +from starlette.middleware.cors import CORSMiddleware +from starlette.responses import StreamingResponse, JSONResponse, Response, RedirectResponse from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from starlette.middleware.cors import CORSMiddleware diff --git a/app/static/assets/js/helper.js b/app/static/assets/js/helper.js index 90f3e8d..d1fd912 100644 --- a/app/static/assets/js/helper.js +++ b/app/static/assets/js/helper.js @@ -49,6 +49,17 @@ async function fetchOriginsWithLeases(element) { } async function fetchLeases(element) { + // datetime config + const dtc = { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + timeZoneName: "short" + } + let xhr = new XMLHttpRequest(); xhr.open("GET", '/-/leases?origin=true', true); xhr.onreadystatechange = function () { @@ -74,9 +85,9 @@ async function fetchLeases(element) { let row = document.createElement('tr'); row.innerHTML = `
${o.lease_ref}
${o.origin_ref}