From 61decfcd031b1d58125345a3fcce69b5dac9ae7d Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Thu, 7 Nov 2024 09:33:50 +0700 Subject: [PATCH] feat: update users save password --- app/database/entity/users.entity.go | 1 + app/module/users/service/users.service.go | 1 + 2 files changed, 2 insertions(+) diff --git a/app/database/entity/users.entity.go b/app/database/entity/users.entity.go index ddd3bb8..09e55c3 100644 --- a/app/database/entity/users.entity.go +++ b/app/database/entity/users.entity.go @@ -23,6 +23,7 @@ type Users struct { StatusId *int `json:"status_id" gorm:"type:int4;default:1"` CreatedById *uint `json:"created_by_id" gorm:"type:int4"` ProfilePicturePath *string `json:"profile_picture_path" gorm:"type:varchar"` + TempPassword *string `json:"temp_password" gorm:"type:varchar"` IsActive *bool `json:"is_active" gorm:"type:bool;default:true"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` diff --git a/app/module/users/service/users.service.go b/app/module/users/service/users.service.go index a6d407c..97ee7b5 100644 --- a/app/module/users/service/users.service.go +++ b/app/module/users/service/users.service.go @@ -89,6 +89,7 @@ func (_i *usersService) Save(req request.UsersCreateRequest, authToken string) ( } newReq.KeycloakId = &keycloakId + newReq.TempPassword = &req.Password return _i.Repo.Create(newReq) }