aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/hypothesis/HypothesisApiUtils.ts
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-07-10 10:25:42 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-07-10 10:25:42 -0700
commita721dabf0432286f60bd33bef8a80159b04b6e53 (patch)
tree438f5a53c2897f9702d186c7a88666f9b01cc406 /src/client/apis/hypothesis/HypothesisApiUtils.ts
parentc10798535cbf1854c9b9ba51f119d24fcc613de4 (diff)
parent5e22d4aa9eefb8c92859fc0d1adb508429af2106 (diff)
pull changes
Diffstat (limited to 'src/client/apis/hypothesis/HypothesisApiUtils.ts')
-rw-r--r--src/client/apis/hypothesis/HypothesisApiUtils.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/apis/hypothesis/HypothesisApiUtils.ts b/src/client/apis/hypothesis/HypothesisApiUtils.ts
index f31fa60a1..9cd4b9f80 100644
--- a/src/client/apis/hypothesis/HypothesisApiUtils.ts
+++ b/src/client/apis/hypothesis/HypothesisApiUtils.ts
@@ -43,12 +43,13 @@ export namespace Hypothesis {
export const getPlaceholderId = async (username: string, searchKeyWord: string) => {
const getResponse = await Hypothesis.searchAnnotation(username, searchKeyWord);
const id = getResponse.rows.length > 0 ? getResponse.rows[0].id : undefined;
- return StrCast(id);
+ const uri = getResponse.rows.length > 0 ? getResponse.rows[0].uri : undefined;
+ return id ? { id, uri } : undefined;
};
// Send request to Hypothes.is client to modify a placeholder annotation into a hyperlink to Dash
export const dispatchLinkRequest = async (title: string, url: string, annotationId: string) => {
- const apiKey = "6879-GHmtDG_P2kmWNKM3hcHptEUZX3VMOUePkamCaOrJbSw";
+ const apiKey = "6879-DnMTKjWjnnLPa0Php7f5Ra2kunZ_X0tMRDbTF220_q0";
const oldAnnotation = await fetchAnnotation(annotationId);
const oldText = StrCast(oldAnnotation.text);