Documentation ¶
Index ¶
- type GlobalMapper
- func (mapper *GlobalMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *GlobalMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *GlobalMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *GlobalMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *GlobalMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, models.UserRole, error)
- func (mapper *GlobalMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *GlobalMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, []models.UserRole, *int, error)
- func (mapper *GlobalMapper) UpdateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *GlobalMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- type IChangeEmailPasswordMapper
- type ICreateMapper
- type IDeleteMany
- type IDeleteOneWithID
- type IGetAllMapper
- type IGetOneWithIDMapper
- type IPatchOneWithIDMapper
- type IUpdateManyMapper
- type IUpdateOneWithIDMapper
- type LinkTableMapper
- func (mapper *LinkTableMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *LinkTableMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *LinkTableMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *LinkTableMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *LinkTableMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, models.UserRole, error)
- func (mapper *LinkTableMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *LinkTableMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, []models.UserRole, *int, error)
- func (mapper *LinkTableMapper) UpdateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *LinkTableMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- type OrganizationMapper
- func (mapper *OrganizationMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *OrganizationMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *OrganizationMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *OrganizationMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *OrganizationMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, models.UserRole, error)
- func (mapper *OrganizationMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *OrganizationMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, []models.UserRole, *int, error)
- func (mapper *OrganizationMapper) UpdateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *OrganizationMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- type OwnershipMapper
- func (mapper *OwnershipMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *OwnershipMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *OwnershipMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *OwnershipMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *OwnershipMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, models.UserRole, error)
- func (mapper *OwnershipMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *OwnershipMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, []models.UserRole, *int, error)
- func (mapper *OwnershipMapper) UpdateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *OwnershipMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- type URLParam
- type UserMapper
- func (mapper *UserMapper) ChangeEmailPasswordWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *UserMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) ([]models.IModel, error)
- func (mapper *UserMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *UserMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
- func (mapper *UserMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, models.UserRole, error)
- func (mapper *UserMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, ...) (models.IModel, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalMapper ¶ added in v0.1.46
type GlobalMapper struct { }
GlobalMapper is a basic CRUD manager
func SharedGlobalMapper ¶ added in v0.1.46
func SharedGlobalMapper() *GlobalMapper
SharedGlobalMapper creats a singleton of Crud object
func (*GlobalMapper) CreateMany ¶ added in v0.1.46
func (mapper *GlobalMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
CreateMany creates an instance of this model based on json and store it in db
func (*GlobalMapper) CreateOne ¶ added in v0.1.46
func (mapper *GlobalMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel) (models.IModel, error)
CreateOne creates an instance of this model based on json and store it in db
func (*GlobalMapper) DeleteMany ¶ added in v0.1.46
func (mapper *GlobalMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
DeleteMany deletes multiple models
func (*GlobalMapper) DeleteOneWithID ¶ added in v0.1.46
func (mapper *GlobalMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, error)
DeleteOneWithID delete the model TODO: delete the groups associated with this record?
func (*GlobalMapper) GetOneWithID ¶ added in v0.1.46
func (mapper *GlobalMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, models.UserRole, error)
GetOneWithID get one model object based on its type and its id string
func (*GlobalMapper) PatchOneWithID ¶ added in v0.1.46
func (mapper *GlobalMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, jsonPatch []byte, id datatypes.UUID) (models.IModel, error)
PatchOneWithID updates model based on this json This is the same as ownershipdata mapper (inheritance?)
func (*GlobalMapper) ReadAll ¶ added in v0.1.46
func (mapper *GlobalMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, options map[URLParam]interface{}) ([]models.IModel, []models.UserRole, *int, error)
ReadAll is when user do a read
func (*GlobalMapper) UpdateMany ¶ added in v0.1.46
func (mapper *GlobalMapper) UpdateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
UpdateMany updates multiple models This is the same as ownershipdata mapper (inheritance?)
func (*GlobalMapper) UpdateOneWithID ¶ added in v0.1.46
func (mapper *GlobalMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel, id datatypes.UUID) (models.IModel, error)
UpdateOneWithID updates model based on this json This is the same as ownershipdata mapper (inheritance?)
type IChangeEmailPasswordMapper ¶ added in v0.2.2
type IChangeEmailPasswordMapper interface { ChangeEmailPasswordWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelobj models.IModel, id datatypes.UUID) (models.IModel, error) }
IChangeEmailPasswordMapper changes email and password
type ICreateMapper ¶ added in v0.1.25
type ICreateMapper interface { CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel) (models.IModel, error) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj []models.IModel) ([]models.IModel, error) }
ICreateMapper has a create one interface
type IDeleteMany ¶
type IDeleteMany interface { DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error) }
IDeleteMany delete many records
type IDeleteOneWithID ¶
type IDeleteOneWithID interface { DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, error) }
IDeleteOneWithID delete a record with the ID
type IGetAllMapper ¶
type IGetAllMapper interface { ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, options map[URLParam]interface{}) ([]models.IModel, []models.UserRole, *int, error) }
IGetAllMapper gets all record
type IGetOneWithIDMapper ¶
type IGetOneWithIDMapper interface { GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, models.UserRole, error) // contains filtered or unexported methods }
IGetOneWithIDMapper gets a record with ID
type IPatchOneWithIDMapper ¶
type IPatchOneWithIDMapper interface { PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, jsonPatch []byte, id datatypes.UUID) (models.IModel, error) }
IPatchOneWithIDMapper patch a record with the ID
type IUpdateManyMapper ¶
type IUpdateManyMapper interface { UpdateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error) }
IUpdateManyMapper updates many records
type IUpdateOneWithIDMapper ¶
type IUpdateOneWithIDMapper interface { UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelobj models.IModel, id datatypes.UUID) (models.IModel, error) }
IUpdateOneWithIDMapper updates a record with the ID
type LinkTableMapper ¶ added in v0.3.0
type LinkTableMapper struct { }
LinkTableMapper is a basic CRUD manager
func SharedLinkTableMapper ¶ added in v0.3.0
func SharedLinkTableMapper() *LinkTableMapper
SharedLinkTableMapper creats a singleton of Crud object
func (*LinkTableMapper) CreateMany ¶ added in v0.3.0
func (mapper *LinkTableMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
CreateMany creates an instance of this model based on json and store it in db
func (*LinkTableMapper) CreateOne ¶ added in v0.3.0
func (mapper *LinkTableMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel) (models.IModel, error)
CreateOne creates an instance of this model based on json and store it in db when creating, need to put yourself in OrganizationUser as well. Well check this!!
func (*LinkTableMapper) DeleteMany ¶ added in v0.3.0
func (mapper *LinkTableMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
DeleteMany deletes multiple models
func (*LinkTableMapper) DeleteOneWithID ¶ added in v0.3.0
func (mapper *LinkTableMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, error)
DeleteOneWithID delete the model
func (*LinkTableMapper) GetOneWithID ¶ added in v0.3.0
func (mapper *LinkTableMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, models.UserRole, error)
GetOneWithID get one model object based on its type and its id string
func (*LinkTableMapper) PatchOneWithID ¶ added in v0.3.0
func (mapper *LinkTableMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, jsonPatch []byte, id datatypes.UUID) (models.IModel, error)
PatchOneWithID updates model based on this json
func (*LinkTableMapper) ReadAll ¶ added in v0.3.0
func (mapper *LinkTableMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, options map[URLParam]interface{}) ([]models.IModel, []models.UserRole, *int, error)
ReadAll obtains a slice of models.DomainModel options can be string "offset" and "limit", both of type int This is very Javascript-esque. I would have liked Python's optional parameter more. Alas, no such feature in Go. https://stackoverflow.com/questions/2032149/optional-parameters-in-go How does Gorm do the following? Might want to check out its source code. Cancel offset condition with -1
db.Offset(10).Find(&users1).Offset(-1).Find(&users2)
type OrganizationMapper ¶ added in v0.1.28
type OrganizationMapper struct { }
OrganizationMapper is a basic CRUD manager
func SharedOrganizationMapper ¶ added in v0.1.28
func SharedOrganizationMapper() *OrganizationMapper
SharedOrganizationMapper creats a singleton of Crud object
func (*OrganizationMapper) CreateMany ¶ added in v0.1.28
func (mapper *OrganizationMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
CreateMany creates an instance of this model based on json and store it in db
func (*OrganizationMapper) CreateOne ¶ added in v0.1.28
func (mapper *OrganizationMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel) (models.IModel, error)
CreateOne creates an instance of this model based on json and store it in db when creating, need to put yourself in OrganizationUser as well. Well check this!!
func (*OrganizationMapper) DeleteMany ¶ added in v0.1.28
func (mapper *OrganizationMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
DeleteMany deletes multiple models
func (*OrganizationMapper) DeleteOneWithID ¶ added in v0.1.28
func (mapper *OrganizationMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, error)
DeleteOneWithID delete the model TODO: delete the groups associated with this record?
func (*OrganizationMapper) GetOneWithID ¶ added in v0.1.28
func (mapper *OrganizationMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, models.UserRole, error)
GetOneWithID get one model object based on its type and its id string
func (*OrganizationMapper) PatchOneWithID ¶ added in v0.1.28
func (mapper *OrganizationMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, jsonPatch []byte, id datatypes.UUID) (models.IModel, error)
PatchOneWithID updates model based on this json
func (*OrganizationMapper) ReadAll ¶ added in v0.1.28
func (mapper *OrganizationMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, options map[URLParam]interface{}) ([]models.IModel, []models.UserRole, *int, error)
ReadAll obtains a slice of models.DomainModel options can be string "offset" and "limit", both of type int This is very Javascript-esque. I would have liked Python's optional parameter more. Alas, no such feature in Go. https://stackoverflow.com/questions/2032149/optional-parameters-in-go How does Gorm do the following? Might want to check out its source code. Cancel offset condition with -1
db.Offset(10).Find(&users1).Offset(-1).Find(&users2)
type OwnershipMapper ¶ added in v0.1.18
type OwnershipMapper struct { }
OwnershipMapper is a basic CRUD manager
func SharedOwnershipMapper ¶ added in v0.1.18
func SharedOwnershipMapper() *OwnershipMapper
SharedOwnershipMapper creats a singleton of Crud object
func (*OwnershipMapper) CreateMany ¶ added in v0.1.24
func (mapper *OwnershipMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
CreateMany creates an instance of this model based on json and store it in db
func (*OwnershipMapper) CreateOne ¶ added in v0.1.18
func (mapper *OwnershipMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel) (models.IModel, error)
CreateOne creates an instance of this model based on json and store it in db
func (*OwnershipMapper) DeleteMany ¶ added in v0.1.18
func (mapper *OwnershipMapper) DeleteMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
DeleteMany deletes multiple models
func (*OwnershipMapper) DeleteOneWithID ¶ added in v0.1.18
func (mapper *OwnershipMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, error)
DeleteOneWithID delete the model TODO: delete the groups associated with this record?
func (*OwnershipMapper) GetOneWithID ¶ added in v0.1.18
func (mapper *OwnershipMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, models.UserRole, error)
GetOneWithID get one model object based on its type and its id string
func (*OwnershipMapper) PatchOneWithID ¶ added in v0.1.18
func (mapper *OwnershipMapper) PatchOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, jsonPatch []byte, id datatypes.UUID) (models.IModel, error)
PatchOneWithID updates model based on this json
func (*OwnershipMapper) ReadAll ¶ added in v0.1.18
func (mapper *OwnershipMapper) ReadAll(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, options map[URLParam]interface{}) ([]models.IModel, []models.UserRole, *int, error)
ReadAll obtains a slice of models.DomainModel options can be string "offset" and "limit", both of type int This is very Javascript-esque. I would have liked Python's optional parameter more. Alas, no such feature in Go. https://stackoverflow.com/questions/2032149/optional-parameters-in-go How does Gorm do the following? Might want to check out its source code. Cancel offset condition with -1
db.Offset(10).Find(&users1).Offset(-1).Find(&users2)
type URLParam ¶ added in v0.1.50
type URLParam string
URLParam is the URL parameter
const ( URLParamOffset URLParam = "offset" URLParamLimit URLParam = "limit" URLParamOrder URLParam = "order" URLParamLatestN URLParam = "latestn" URLParamCstart URLParam = "cstart" URLParamCstop URLParam = "cstop" URLParamHasTotalCount URLParam = "totalcount" URLParamOtherQueries URLParam = "better_otherqueries" )
type UserMapper ¶
type UserMapper struct { }
UserMapper is a User CRUD manager
func SharedUserMapper ¶
func SharedUserMapper() *UserMapper
SharedUserMapper creats a singleton of Crud object
func (*UserMapper) ChangeEmailPasswordWithID ¶ added in v0.2.2
func (mapper *UserMapper) ChangeEmailPasswordWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel, id datatypes.UUID) (models.IModel, error)
ChangeEmailPasswordWithID changes email and/or password
func (*UserMapper) CreateMany ¶ added in v0.1.24
func (mapper *UserMapper) CreateMany(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObjs []models.IModel) ([]models.IModel, error)
CreateMany is currently a dummy
func (*UserMapper) CreateOne ¶
func (mapper *UserMapper) CreateOne(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel) (models.IModel, error)
CreateOne creates an user model based on json and store it in db Also creates a ownership with admin access
func (*UserMapper) DeleteOneWithID ¶
func (mapper *UserMapper) DeleteOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, error)
DeleteOneWithID deletes the user with the ID
func (*UserMapper) GetOneWithID ¶
func (mapper *UserMapper) GetOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, id datatypes.UUID) (models.IModel, models.UserRole, error)
GetOneWithID get one model object based on its type and its id string
func (*UserMapper) UpdateOneWithID ¶
func (mapper *UserMapper) UpdateOneWithID(db *gorm.DB, oid *datatypes.UUID, scope *string, typeString string, modelObj models.IModel, id datatypes.UUID) (models.IModel, error)
UpdateOneWithID updates model based on this json Update DOESN'T change password. It'll load up the password hash and save the same. Update password require special endpoint