Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

[major] logout by only killing one key, not all #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xavdid
Copy link
Contributor

@xavdid xavdid commented Apr 25, 2019

By default, zapier logout deactivated all keys. That's odd behavior, so we're doing to make it only kill the active key. This relies on some server work that's not done yet, so there's not much to see yet. Also did some unrelated logging improvements.

@xavdid xavdid marked this pull request as ready for review May 22, 2019 16:45
@xavdid xavdid changed the title logout by only killing one key, not all [major] logout by only killing one key, not all May 22, 2019
try {
await utils.callAPI('/keys', {
method: 'DELETE'
method: 'DELETE',
body: { single: true }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only actual code change

const requestBody = JSON.parse(requestOptions.body);
const cleanedBody = {};
for (const k in requestBody) {
if (k.includes('zip_file')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this prevents adding a zip_file key when there wasn't one before. I was super confused as to why my DELETE call had 2 zips attached.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant