Closed genxstylez closed 7 years ago
Strange that nobody has answered this question yet. Your document must comply with the AfterSaveHook interface (declared in collection.go). It means that you should only add AfterSave(*Collection) method, something like this:
type Person struct {
// ... same as in example
}
func (doc *Person) AfterSave(c *bongo.Collection) error {
// do something
return nil
}
Can you give me a simple example?
Thanks