<fields> is missing.
Created a simple post request that should create a user with a specific name, but I get an error
app.controllers.ts:
app.service.ts:
I don't even know what can cause it, I'm new to this field, but I read a couple of articles in detail on how to get started. But it didn't work. By the way, this request works properly!
PrismaClientValidationError:
Invalid
C:\Users\reven\proj\src\app.service.ts:14:29
11 }
12
13 async createUser(name: string) {
→ 14 return this.prisma.user.create({
data: {
+ name: String
}
})
Argument
app.controllers.ts:
app.service.ts:
I don't even know what can cause it, I'm new to this field, but I read a couple of articles in detail on how to get started. But it didn't work. By the way, this request works properly!
PrismaClientValidationError:
Invalid
this.prisma.user.create() invocation inC:\Users\reven\proj\src\app.service.ts:14:29
11 }
12
13 async createUser(name: string) {
→ 14 return this.prisma.user.create({
data: {
+ name: String
}
})
Argument
name is missing.