feat(BE): sso delete and fix response too many request

This commit is contained in:
ragilap
2026-01-02 12:04:50 +07:00
parent fe51f33ab4
commit cc5a58b6d1
4 changed files with 273 additions and 2 deletions
@@ -42,7 +42,7 @@ func (r *UserRepositoryImpl) GetByIdUser(
modifier func(*gorm.DB) *gorm.DB,
) (*entity.User, error) {
return r.BaseRepositoryImpl.First(ctx, func(db *gorm.DB) *gorm.DB {
return db.Where("id_user = ?", idUser)
return db.Where("id_user::bigint = ?::bigint", idUser)
})
}
@@ -93,7 +93,7 @@ func (r *UserRepositoryImpl) UpsertByIdUser(ctx context.Context, user *entity.Us
}
func (r *UserRepositoryImpl) SoftDeleteByIdUser(ctx context.Context, idUser int64) error {
query := r.DB().WithContext(ctx).Where("id_user = ?", idUser)
query := r.DB().WithContext(ctx).Where("id_user::bigint = ?::bigint", idUser)
result := query.Delete(&entity.User{})
if result.Error != nil {
return result.Error