Skip to content

Commit

Permalink
Clean up pass
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellrgn committed Aug 18, 2023
1 parent 3f501ec commit 04c2db4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// import {PUBLIC_BASE_URL} from '$env/static/public';
import { dev } from '$app/environment';

export const API_BASE = 'https://smart-health-links-server.cirg.washington.edu/api'
export const API_BASE = 'https://smart-health-links-server.cirg.washington.edu/api';
export const VIEWER_BASE = new URL(
`/ips${dev ? '/index.html' : ''}#`,
window.location.href
Expand Down
4 changes: 2 additions & 2 deletions static/ips/assets/js/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const config = {
html_dir: "/ips/assets/html-waverify/",
template_dir: "/ips/templates-waverify/",
show_demo: true,
show_demo: false,
}

export default config;
export default config;
4 changes: 2 additions & 2 deletions static/ips/assets/js/renderIPS.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function updateDisplayMode(displayMode) {
dropdown.html(newText);
}
shlContents.forEach((e, i) => {
update(e, (shlContents.length === 1 && !config.show_demo ? "" : i));
update(e, (shlContents.length === 1 ? "" : i));
});
updateFromText();
};
Expand Down Expand Up @@ -402,4 +402,4 @@ function checks(ips) {
if (!sections.problems) data.errors.push("Missing required problems section");
}
renderTable(data);
}
}
7 changes: 3 additions & 4 deletions static/ips/assets/js/retreiveIPS.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as shlClient from 'http://smart-health-links-demo.cirg.washington.edu/index.js';
import * as shlClient from 'https://smart-health-links-demo.cirg.washington.edu/index.js';
import { verify } from 'https://smart-health-links-demo.cirg.washington.edu/shc-decoder.js';
import { prepareSHLContents } from "./renderIPS.js";

let data = [];
const shl = window.location.hash.match(/shlink:\/.*/)?.[0];
if (shl) {
retrieve()
Expand All @@ -24,6 +23,6 @@ async function retrieve(){
});

const decoded = await Promise.all(retrieved.shcs.map(verify));
data = decoded.map((e) => e.fhirBundle);
const data = decoded.map((e) => e.fhirBundle);
prepareSHLContents(data);
}
}

0 comments on commit 04c2db4

Please sign in to comment.