aboutsummaryrefslogtreecommitdiff
path: root/src/server/database.ts
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-07-10 16:26:08 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-07-10 16:26:08 -0700
commit8594b7e8f3058a8d441413a033aee311ee59bdfd (patch)
tree3b4964720b71ce12249dc73db6946910c9deacb9 /src/server/database.ts
parent4f16c24aa5221db8670fa69b7f7bee0f897fb203 (diff)
hypothes.is authentication is fully functional, no longer need to manually input username/api key
Diffstat (limited to 'src/server/database.ts')
-rw-r--r--src/server/database.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/database.ts b/src/server/database.ts
index 767d38350..456c1c254 100644
--- a/src/server/database.ts
+++ b/src/server/database.ts
@@ -413,6 +413,7 @@ export namespace Database {
interface StoredCredentials {
userId: string;
hypothesisApiKey: string;
+ hypothesisUsername: string;
_id?: string;
}
@@ -420,8 +421,8 @@ export namespace Database {
* Writes the @param hypothesisApiKey to the database, associated
* with @param userId for later retrieval and updating.
*/
- export const Write = async (userId: string, hypothesisApiKey: string) => {
- return Instance.insert({ userId, hypothesisApiKey }, AuxiliaryCollections.HypothesisAccess);
+ export const Write = async (userId: string, hypothesisApiKey: string, hypothesisUsername: string) => {
+ return Instance.insert({ userId, hypothesisApiKey, hypothesisUsername }, AuxiliaryCollections.HypothesisAccess);
};
/**