Commit 31e065a
committed
fix(events): optimize GetEvent query for single record
Refactored GetEvent to use First instead of Find, improving performance
and readability. This change ensures only one record is fetched by id,
removes redundant error handling, and uses idiomatic GORM practices.1 parent 6ee133a commit 31e065a
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
16 | 13 | | |
17 | 14 | | |
18 | | - | |
| 15 | + | |
0 commit comments