-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Description
Property name casing is inconsistent. Request parameters must be passed in snake_case but the response is camelCase. This may be intended behavior and I've only tested this with Ident.createUser.
Steps to reproduce
This results in a 422 error
import { Ident } from "provide-js"
const user = await Ident.createUser({
firstName: "John",
lastName: "Doe",
email: "john.doe@acme.com",
password: "foo"
})This succeeds
import { Ident } from "provide-js"
const user = await Ident.createUser({
first_name: "John",
last_name: "Doe",
email: "john.doe@acme.com",
password: "foo"
})
console.log(user)
/*
Model {
id: '8dc3339b-323f-472e-a761-e37f2eea1e3a',
createdAt: '2021-09-09T16:09:01.774093147Z',
name: 'Joe User',
firstName: 'Joe',
lastName: 'User',
email: 'john@acme.com',
permissions: 415,
privacyPolicyAgreedAt: null,
termsOfServiceAgreedAt: null
}
*/Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels