feat/user: reworking auth
This commit is contained in:
No files matched your search
@@ -83,7 +83,7 @@ func Create(input e.CreateDto) (*d.Data, error) {
|
||||
data = *resData
|
||||
}
|
||||
|
||||
if input.ContractPosition_Code == ero.CSCSpi {
|
||||
if input.ContractPosition_Code == ero.CSCInt {
|
||||
createInt := esi.CreateDto{
|
||||
Person_Id: input.Person_Id,
|
||||
Specialist_Id: input.Specialist_Id,
|
||||
@@ -336,7 +336,7 @@ func Update(input e.UpdateDto) (*d.Data, error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if input.ContractPosition_Code == ero.CSCSpi {
|
||||
if input.ContractPosition_Code == ero.CSCInt {
|
||||
readInt := esi.ReadDetailDto{User_Id: &data.Id}
|
||||
readIntData, err := usi.ReadDetailData(readInt, &event, tx)
|
||||
if err != nil {
|
||||
|
||||
@@ -56,7 +56,7 @@ func setDataEmployeeUpdate(src e.EmployeUpdateDto) ee.UpdateDto {
|
||||
func getPersonIdByUserId(userId uint, positionCode erg.ContractPositionCode, event *pl.Event, tx *gorm.DB) (*uint, error) {
|
||||
pl.SetLogInfo(event, nil, "started", "DBGetPersonIdByUserId")
|
||||
if positionCode == erg.CSCEmp {
|
||||
} else if positionCode == erg.CSCSpi {
|
||||
} else if positionCode == erg.CSCInt {
|
||||
specInt, err := usi.ReadDetailData(esi.ReadDetailDto{User_Id: &userId}, event, tx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user