/
hooks.go
38 lines (31 loc) · 1.05 KB
/
hooks.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/magewar/mage/x/reports/types"
)
// Implement ReportsHooks interface
var _ types.ReportsHooks = Keeper{}
// AfterReportSaved implements types.ReportsHooks
func (k Keeper) AfterReportSaved(ctx sdk.Context, subspaceID uint64, reportID uint64) {
if k.hooks != nil {
k.hooks.AfterReportSaved(ctx, subspaceID, reportID)
}
}
// AfterReportDeleted implements types.ReportsHooks
func (k Keeper) AfterReportDeleted(ctx sdk.Context, subspaceID uint64, reportID uint64) {
if k.hooks != nil {
k.hooks.AfterReportDeleted(ctx, subspaceID, reportID)
}
}
// AfterReasonSaved implements types.ReportsHooks
func (k Keeper) AfterReasonSaved(ctx sdk.Context, subspaceID uint64, reasonID uint32) {
if k.hooks != nil {
k.hooks.AfterReasonSaved(ctx, subspaceID, reasonID)
}
}
// AfterReasonDeleted implements types.ReportsHooks
func (k Keeper) AfterReasonDeleted(ctx sdk.Context, subspaceID uint64, reasonID uint32) {
if k.hooks != nil {
k.hooks.AfterReasonDeleted(ctx, subspaceID, reasonID)
}
}