fix(medusa): Accept invite should not require first/last name (#5279)

**What**
Makes the first and last name optional when accepting an invite since those column can be nullable
This commit is contained in:
Adrien de Peretti
2023-10-03 16:30:27 +02:00
committed by GitHub
parent 90e24c593f
commit f9264c479e
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): Accept invite should not require first/last name
@@ -1,4 +1,9 @@
import { IsNotEmpty, IsString, ValidateNested } from "class-validator"
import {
IsNotEmpty,
IsOptional,
IsString,
ValidateNested,
} from "class-validator"
import InviteService from "../../../../services/invite"
import { Type } from "class-transformer"
@@ -92,9 +97,11 @@ export default async (req, res) => {
export class AdminPostInvitesInviteAcceptUserReq {
@IsString()
@IsOptional()
first_name: string
@IsString()
@IsOptional()
last_name: string
@IsString()