Skip to content

Commit 7b93712

Browse files
committed
Fix type errors
1 parent 9ce8b9d commit 7b93712

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/app/api/users/route.test.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ test("expired user invite", async () => {
121121
id: 0,
122122
userType: UserType.SUPER_ADMIN,
123123
email: "test_email@test.com",
124-
expiration: yearAgo
124+
expiration: yearAgo,
125+
partnerDetails: null,
126+
name: ""
125127
});
126128

127129
const res = await fetch({ method: "POST", body: getGoodFormData() });
@@ -143,7 +145,9 @@ test("user already exists", async () => {
143145
id: 0,
144146
userType: UserType.SUPER_ADMIN,
145147
email: "test_email@test.com",
146-
expiration: yearLater
148+
expiration: yearLater,
149+
partnerDetails: null,
150+
name: ""
147151
});
148152

149153
dbMock.user.create.mockImplementation(() => {
@@ -176,7 +180,9 @@ test("successful create", async () => {
176180
id: 0,
177181
userType: UserType.SUPER_ADMIN,
178182
email: "test_email@test.com",
179-
expiration: yearLater
183+
expiration: yearLater,
184+
partnerDetails: null,
185+
name: ""
180186
});
181187

182188
const res = await fetch({ method: "POST", body: getGoodFormData() });

src/app/api/users/route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export async function POST(req: NextRequest) {
7575
try {
7676
await db.user.create({
7777
data: {
78+
name: userInvite.name,
7879
email: userInvite.email,
7980
passwordHash: await argon2.hash(password),
8081
type: userInvite.userType

0 commit comments

Comments
 (0)