From 59d4fc0b8ba053533b9035d5d7afbb6cdb164a7d Mon Sep 17 00:00:00 2001 From: Brandur Date: Wed, 25 Jul 2018 08:35:29 -0700 Subject: [PATCH] Whitelist RPC-style actions `/approve` and `/decline` stripe-mock currently needs a whitelist of RPC-style names so that it can differentiate between an RPC endpoint and a subcollection when deciding whether to include the primary ID from a URL. Here we add two new ones for `/approve` and `/decline`. --- server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.go b/server.go index 135b5c9b..6eaf36d5 100644 --- a/server.go +++ b/server.go @@ -399,9 +399,11 @@ var hasPrimaryIDSuffixes = [...]string{ // These are resource "actions". They don't take the standard form, but we // can expect an object's primary ID to live right before them in a path. + "/approve", "/capture", "/cancel", "/close", + "/decline", "/pay", "/refund", "/reject",