Skip to content

[NEW] Added function to delete visitor data#45

Merged
ggazzo merged 2 commits intomultiple-clientsfrom
feature/delete-visitor
Jan 7, 2019
Merged

[NEW] Added function to delete visitor data#45
ggazzo merged 2 commits intomultiple-clientsfrom
feature/delete-visitor

Conversation

if (!this.success(result, ignore)) throw result
this.logger && this.logger.debug(`[API] ${method} ${endpoint} result ${result.status}`)
return (method === 'DELETE') ? result : result.data
const hasDataInsideResult = result && !result.data;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@MarcosSpessatto, just a suggestion, I would implement something like the statement below:

const { data } = result;
return (method === 'DELETE') && (data || result);

It's just a suggestion, your code is working fine as well.

@ggazzo ggazzo merged commit a5b6a21 into multiple-clients Jan 7, 2019
@ggazzo ggazzo deleted the feature/delete-visitor branch January 7, 2019 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants