more
This commit is contained in:
parent
6d2a264295
commit
86766a28f9
|
@ -105,7 +105,8 @@ export async function updateLingdocsUser(uuid: T.UUID, toUpdate:
|
|||
} |
|
||||
{ userTextOptionsRecord: T.UserTextOptionsRecord } |
|
||||
{ upgradeToStudentRequest: "waiting" } |
|
||||
{ upgradeToStudentRequest: "denied" }
|
||||
{ upgradeToStudentRequest: "denied" } |
|
||||
{ lastActive: T.TimeStamp }
|
||||
): Promise<T.LingdocsUser> {
|
||||
const user = await getLingdocsUser("userId", uuid);
|
||||
if (!user) throw new Error("unable to update - user not found " + uuid);
|
||||
|
|
|
@ -17,6 +17,7 @@ import {
|
|||
} from "../lib/user-utils";
|
||||
import env from "../lib/env-vars";
|
||||
import * as T from "../../../website/src/lib/account-types";
|
||||
import { getTimestamp } from "../lib/time-utils";
|
||||
|
||||
export const outsideProviders: ("github" | "google" | "twitter")[] = ["github", "google", "twitter"];
|
||||
|
||||
|
@ -150,7 +151,7 @@ function setupPassport(passport: PassportStatic) {
|
|||
cb(null, false);
|
||||
return;
|
||||
}
|
||||
const newUser = await insertLingdocsUser(updateLastActive(user));
|
||||
const newUser = await updateLingdocsUser(userId, { lastActive: getTimestamp() });
|
||||
cb(null, newUser);
|
||||
} catch (err) {
|
||||
cb(err, null);
|
||||
|
|
Loading…
Reference in New Issue