make thing a pointer on chore
This commit is contained in:
		
							parent
							
								
									6845fd54f1
								
							
						
					
					
						commit
						f115d70c49
					
				| 
						 | 
					@ -488,7 +488,7 @@ func (h *Handler) editChore(c *gin.Context) {
 | 
				
			||||||
	go func() {
 | 
						go func() {
 | 
				
			||||||
		h.nPlanner.GenerateNotifications(c, updatedChore)
 | 
							h.nPlanner.GenerateNotifications(c, updatedChore)
 | 
				
			||||||
	}()
 | 
						}()
 | 
				
			||||||
	if oldChore.ThingChore.ThingID != 0 {
 | 
						if oldChore.ThingChore != nil {
 | 
				
			||||||
		// TODO: Add check to see if dissociation is necessary
 | 
							// TODO: Add check to see if dissociation is necessary
 | 
				
			||||||
		h.tRepo.DissociateThingWithChore(c, oldChore.ThingChore.ThingID, oldChore.ID)
 | 
							h.tRepo.DissociateThingWithChore(c, oldChore.ThingChore.ThingID, oldChore.ID)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@ type Chore struct {
 | 
				
			||||||
	UpdatedAt            time.Time          `json:"updatedAt" gorm:"column:updated_at"`                           // When the chore was last updated
 | 
						UpdatedAt            time.Time          `json:"updatedAt" gorm:"column:updated_at"`                           // When the chore was last updated
 | 
				
			||||||
	CreatedBy            int                `json:"createdBy" gorm:"column:created_by"`                           // Who created the chore
 | 
						CreatedBy            int                `json:"createdBy" gorm:"column:created_by"`                           // Who created the chore
 | 
				
			||||||
	UpdatedBy            int                `json:"updatedBy" gorm:"column:updated_by"`                           // Who last updated the chore
 | 
						UpdatedBy            int                `json:"updatedBy" gorm:"column:updated_by"`                           // Who last updated the chore
 | 
				
			||||||
	ThingChore           tModel.ThingChore `json:"thingChore" gorm:"foreignkey:chore_id;references:id;<-:false"` // ThingChore relationship
 | 
						ThingChore           *tModel.ThingChore `json:"thingChore" gorm:"foreignkey:chore_id;references:id;<-:false"` // ThingChore relationship
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
type ChoreAssignees struct {
 | 
					type ChoreAssignees struct {
 | 
				
			||||||
	ID      int `json:"-" gorm:"primary_key"`
 | 
						ID      int `json:"-" gorm:"primary_key"`
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue