File tree 3 files changed +18
-5
lines changed
3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ enum Entrypoint {
37
37
let app = Application ( env)
38
38
39
39
defer {
40
- Task {
41
- // This may not delete all because it's async
42
- // Be sure to delete manually in dashboard
43
- await deleteHooks ( app)
44
- }
45
40
app. shutdown ( )
46
41
}
47
42
Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ extension HookFunction {
59
59
if error. containedIn ( [ . webhookError] ) && method == . POST {
60
60
// swiftlint:disable:next line_length
61
61
configuration. logger. warning ( " Hook Function: \" \( String ( describing: hookFunction) ) \" ; warning: \( error) ; on server: \( parseServerURLString) " )
62
+ try await Self . method ( . DELETE,
63
+ path,
64
+ name: name,
65
+ parseServerURLStrings: parseServerURLStrings)
66
+ return try await Self . method ( method,
67
+ path,
68
+ name: name,
69
+ parseServerURLStrings: parseServerURLStrings)
62
70
} else {
63
71
// swiftlint:disable:next line_length
64
72
configuration. logger. error ( " Could not \( method) Hook Function: \" \( String ( describing: hookFunction) ) \" ; error: \( error) ; on server: \( parseServerURLString) " )
Original file line number Diff line number Diff line change @@ -69,6 +69,16 @@ extension HookTrigger {
69
69
if error. containedIn ( [ . webhookError] ) && method == . POST {
70
70
// swiftlint:disable:next line_length
71
71
configuration. logger. warning ( " Hook Trigger: \" \( String ( describing: hookTrigger) ) \" ; warning: \( error) ; on server: \( parseServerURLString) " )
72
+ try await Self . method ( . DELETE,
73
+ path,
74
+ className: className,
75
+ triggerName: triggerName,
76
+ parseServerURLStrings: parseServerURLStrings)
77
+ return try await Self . method ( method,
78
+ path,
79
+ className: className,
80
+ triggerName: triggerName,
81
+ parseServerURLStrings: parseServerURLStrings)
72
82
} else {
73
83
// swiftlint:disable:next line_length
74
84
configuration. logger. error ( " Could not \( method) Hook Trigger: \" \( String ( describing: hookTrigger) ) \" ; error: \( error) ; on server: \( parseServerURLString) " )
You can’t perform that action at this time.
0 commit comments