File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ enum Entrypoint {
3737 let app = Application ( env)
3838
3939 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- }
4540 app. shutdown ( )
4641 }
4742
Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ extension HookFunction {
5959 if error. containedIn ( [ . webhookError] ) && method == . POST {
6060 // swiftlint:disable:next line_length
6161 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)
6270 } else {
6371 // swiftlint:disable:next line_length
6472 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 {
6969 if error. containedIn ( [ . webhookError] ) && method == . POST {
7070 // swiftlint:disable:next line_length
7171 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)
7282 } else {
7383 // swiftlint:disable:next line_length
7484 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