aboutsummaryrefslogtreecommitdiff
path: root/src/server/database.ts
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-10-24 10:44:13 -0400
committerFawn <fangrui_tong@brown.edu>2019-10-24 10:44:13 -0400
commit0f72e2acc66698247503246887a5f5bb572b2753 (patch)
tree9e50a4259e26ef50c31894a7e9b1e6282a267412 /src/server/database.ts
parent45074de50007e0693df8835643464da962e62620 (diff)
parent31166219e473e105b8fd9d49627fd1df58822c55 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into textbox_fawn_fix
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 990441d5a..db86b472d 100644
--- a/src/server/database.ts
+++ b/src/server/database.ts
@@ -4,6 +4,7 @@ import { Opt } from '../new_fields/Doc';
import { Utils, emptyFunction } from '../Utils';
import { DashUploadUtils } from './DashUploadUtils';
import { Credentials } from 'google-auth-library';
+import { GoogleApiServerUtils } from './apis/google/GoogleApiServerUtils';
export namespace Database {
@@ -259,8 +260,8 @@ export namespace Database {
return SanitizedSingletonQuery<StoredCredentials>({ userId }, GoogleAuthentication, removeId);
};
- export const Write = async (userId: string, token: any) => {
- return Instance.insert({ userId, canAccess: [], ...token }, GoogleAuthentication);
+ export const Write = async (userId: string, enrichedCredentials: GoogleApiServerUtils.EnrichedCredentials) => {
+ return Instance.insert({ userId, canAccess: [], ...enrichedCredentials }, GoogleAuthentication);
};
export const Update = async (userId: string, access_token: string, expiry_date: number) => {