Fix refactor import error

This commit is contained in:
Douglas Barone 2020-12-21 11:48:36 -04:00
parent eb22315aca
commit 12876b5385
3 changed files with 6 additions and 4 deletions

View File

@ -21,8 +21,8 @@ CREATE TABLE "ResetToken" (
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL,
"lastLogin" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
"lastLoginPrior" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
"lastLogin" TIMESTAMP(3),
"lastLoginPrior" TIMESTAMP(3),
"roles" JSONB,
"groups" JSONB,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

View File

@ -1,3 +1,5 @@
import { User } from '../../classes/User'
export async function basicUser(parent, { sAMAccountName }) {
if (sAMAccountName === '') throw new Error('Argumento inválido')

View File

@ -11,9 +11,9 @@ const User = {
? parent.groups
: ad.getGroupMembershipForUser(parent.sAMAccountName),
lastLogin: parent => parent.lastLogin.toISOString(),
lastLogin: parent => parent.lastLogin?.toISOString(),
lastLoginPrior: parent => parent.lastLoginPrior.toISOString(),
lastLoginPrior: parent => parent.lastLoginPrior?.toISOString(),
pwdLastSet: parent => parent.pwdLastSet.toISOString(),