Esempio n. 1
0
// Add - Adds action.
func (_ *Actions) Add(query *models.StoreAction, ok *bool) (err error) {
	// Add action to database
	err = query.Add()
	if err == nil {
		*ok = true
	}
	return
}
Esempio n. 2
0
// Get - Gets action.
func (_ *Actions) Get(query *models.StoreAction, result *action.Action) (err error) {
	// Set Action
	query.Action = result

	// Get action from database
	err = query.Get()
	return
}