add event handler API and logic.
This commit is contained in:
@@ -34,7 +34,7 @@ func (r *EventHandlerRepo) FindByID(ctx context.Context, id int) (*models.EventH
|
||||
|
||||
func (r *EventHandlerRepo) FetchAll(ctx context.Context) ([]models.EventHandler, error) {
|
||||
var records []eventHandlerRecord
|
||||
err := r.DBX.SelectContext(ctx, &records, "SELECT * FROM event_handler")
|
||||
err := r.DBX.SelectContext(ctx, &records, "SELECT * FROM event_handler ORDER BY priority DESC, id")
|
||||
if err != nil {
|
||||
return nil, dbErr(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user