Fix refactor import error
This commit is contained in:
parent
eb22315aca
commit
12876b5385
|
@ -21,8 +21,8 @@ CREATE TABLE "ResetToken" (
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE "User" (
|
CREATE TABLE "User" (
|
||||||
"id" SERIAL,
|
"id" SERIAL,
|
||||||
"lastLogin" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
"lastLogin" TIMESTAMP(3),
|
||||||
"lastLoginPrior" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
"lastLoginPrior" TIMESTAMP(3),
|
||||||
"roles" JSONB,
|
"roles" JSONB,
|
||||||
"groups" JSONB,
|
"groups" JSONB,
|
||||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { User } from '../../classes/User'
|
||||||
|
|
||||||
export async function basicUser(parent, { sAMAccountName }) {
|
export async function basicUser(parent, { sAMAccountName }) {
|
||||||
if (sAMAccountName === '') throw new Error('Argumento inválido')
|
if (sAMAccountName === '') throw new Error('Argumento inválido')
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ const User = {
|
||||||
? parent.groups
|
? parent.groups
|
||||||
: ad.getGroupMembershipForUser(parent.sAMAccountName),
|
: 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(),
|
pwdLastSet: parent => parent.pwdLastSet.toISOString(),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user