@@ -87,7 +87,7 @@ func (h *handler) Initialize(s courier.Server) error {
87
87
h .SetServer (s )
88
88
s .AddHandlerRoute (h , http .MethodGet , "receive" , courier .ChannelLogTypeWebhookVerify , h .receiveVerify )
89
89
s .AddHandlerRoute (h , http .MethodPost , "receive" , courier .ChannelLogTypeMultiReceive , handlers .JSONPayload (h , h .receiveEvents ))
90
- s .AddHandlerRoute (h , http .MethodPost , "delete" , courier .ChannelLogTypeEventReceive , handlers .JSONPayload (h , h .deleteEvents ))
90
+ s .AddHandlerRoute (h , http .MethodPost , "delete" , courier .ChannelLogTypeEventReceive , handlers .JSONPayload (h , h .deleteContactEvents ))
91
91
return nil
92
92
}
93
93
@@ -229,8 +229,8 @@ type DeleteConfirmationData struct {
229
229
ConfirmationCode string `json:"confirmation_code"`
230
230
}
231
231
232
- // deleteEvents is our HTTP handler function for deleting data requests
233
- func (h * handler ) deleteEvents (ctx context.Context , channel courier.Channel , w http.ResponseWriter , r * http.Request , payload * DeletionRequestData , clog * courier.ChannelLog ) ([]courier.Event , error ) {
232
+ // deleteContactEvents is our HTTP handler function for deleting data requests
233
+ func (h * handler ) deleteContactEvents (ctx context.Context , channel courier.Channel , w http.ResponseWriter , r * http.Request , payload * DeletionRequestData , clog * courier.ChannelLog ) ([]courier.Event , error ) {
234
234
err := h .validateSignature (r )
235
235
if err != nil {
236
236
return nil , handlers .WriteAndLogRequestError (ctx , h , channel , w , r , err )
@@ -248,7 +248,7 @@ func (h *handler) deleteEvents(ctx context.Context, channel courier.Channel, w h
248
248
payloadJson , _ := json .Marshal (payload )
249
249
sentry .CaptureMessage (fmt .Sprintf ("Data Deletion Request: %s" , payloadJson ))
250
250
251
- event := h .Backend ().NewChannelEvent (channel , courier .EventDeletionRequest , urn , clog ).WithOccurredOn (date ).WithExtra (map [string ]string {"userID" : payload .UserID })
251
+ event := h .Backend ().NewChannelEvent (channel , courier .EventDeleteContact , urn , clog ).WithOccurredOn (date ).WithExtra (map [string ]string {"userID" : payload .UserID })
252
252
253
253
err = h .Backend ().WriteChannelEvent (ctx , event , clog )
254
254
if err != nil {
0 commit comments