Merge pull request 'customer-order' (#7) from customer-order into main
Reviewed-on: https://git.altru.id/Furtuna/furtuna-backend/pulls/7
This commit is contained in:
commit
a0bd756854
@ -29,7 +29,7 @@ type Site struct {
|
||||
Longitude *float64 `json:"longitude"`
|
||||
Region string `json:"region"`
|
||||
Regency string `json:"regency"`
|
||||
Distance float64 `json:"distance"`
|
||||
Distance float64 `gorm:"-"`
|
||||
}
|
||||
|
||||
type SiteSearch struct {
|
||||
|
||||
@ -82,7 +82,7 @@ func (r *OrderRepository) SetOrderStatus(ctx context.Context, db *gorm.DB, order
|
||||
}
|
||||
|
||||
func (r *OrderRepository) Update(ctx context.Context, order *entity.Order) (*entity.Order, error) {
|
||||
if err := r.db.WithContext(ctx).Save(order).Error; err != nil {
|
||||
if err := r.db.WithContext(ctx).Model(&entity.Order{}).Where("id = ?", order.ID).Updates(order).Error; err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when updating order", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user