mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #34484 from overleaf/rh-ol-stripe-id
Sync updated customer email to Stripe/Recurly GitOrigin-RevId: b2becc50cc63739bdf56e45c37939f84c6fcd7a8
This commit is contained in:
@@ -31,11 +31,16 @@ async function updateAccountEmailAddress(userId, newAccountEmail) {
|
||||
})
|
||||
}
|
||||
|
||||
const { body } = await RecurlyWrapper.promises.apiRequest({
|
||||
const { response, body } = await RecurlyWrapper.promises.apiRequest({
|
||||
url: `accounts/${userId}`,
|
||||
method: 'PUT',
|
||||
body: requestBody,
|
||||
expect404: true,
|
||||
})
|
||||
if (response.status === 404) {
|
||||
// the user has no Recurly account
|
||||
return null
|
||||
}
|
||||
return await RecurlyWrapper.promises._parseAccountXml(body)
|
||||
}
|
||||
|
||||
|
||||
@@ -245,6 +245,10 @@ export const UserSchema = new Schema(
|
||||
dsMobileApp: {
|
||||
subscribed: { type: Boolean },
|
||||
},
|
||||
stripeCustomerIds: {
|
||||
us: { type: String },
|
||||
uk: { type: String },
|
||||
},
|
||||
},
|
||||
{ minimize: false }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user