add event handler API and logic.

This commit is contained in:
2021-09-20 21:05:24 +02:00
parent 1cf8c019e5
commit 56a0525b9d
6 changed files with 230 additions and 19 deletions
+1 -1
View File
@@ -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)
}