mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
[chore] NodeJS 12 (#2722)
* chore: upgraded node 12, more log lines - upgraded from 10 LTS to 12 LTS - added log line with userID to GraphQL log entry * fix: adjusted some intl formats
This commit is contained in:
@@ -84,11 +84,6 @@ export async function findOrCreateSSOUser(
|
||||
token: SSOToken,
|
||||
now = new Date()
|
||||
) {
|
||||
if (!token.user) {
|
||||
// TODO: (wyattjoh) replace with better error.
|
||||
throw new Error("token is malformed, missing user claim");
|
||||
}
|
||||
|
||||
// Validate the token content.
|
||||
const decodedToken: SSOToken = validate(SSOTokenSchema, token);
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ export function logQuery(
|
||||
ctx.logger.info(
|
||||
{
|
||||
responseTime,
|
||||
// deprecated: use of the `authenticated` log field is deprecated in favour of the `userID` field
|
||||
authenticated: ctx.user ? true : false,
|
||||
userID: ctx.user ? ctx.user.id : null,
|
||||
...(persisted
|
||||
? // A persisted query was provided, we can pull the operation metadata
|
||||
// out from the persisted object.
|
||||
|
||||
Reference in New Issue
Block a user