@@ -87,7 +87,7 @@ func (h *handler) Initialize(s courier.Server) error {
8787 h .SetServer (s )
8888 s .AddHandlerRoute (h , http .MethodGet , "receive" , courier .ChannelLogTypeWebhookVerify , h .receiveVerify )
8989 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 ))
9191 return nil
9292}
9393
@@ -229,8 +229,8 @@ type DeleteConfirmationData struct {
229229 ConfirmationCode string `json:"confirmation_code"`
230230}
231231
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 ) {
234234 err := h .validateSignature (r )
235235 if err != nil {
236236 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
248248 payloadJson , _ := json .Marshal (payload )
249249 sentry .CaptureMessage (fmt .Sprintf ("Data Deletion Request: %s" , payloadJson ))
250250
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 })
252252
253253 err = h .Backend ().WriteChannelEvent (ctx , event , clog )
254254 if err != nil {
0 commit comments