update api using gorm